[maemo-commits] [maemo-commits] r13639 - in projects/haf/trunk/hildon-desktop: . debian libhildondesktop

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Sep 6 15:53:09 EEST 2007
Author: jobi
Date: 2007-09-06 15:53:08 +0300 (Thu, 06 Sep 2007)
New Revision: 13639

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/debian/copyright
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-window-composite.c
Log:

2007-09-06 Johan Bilien  <johan.bilien at nokia.com>

	* libhildondesktop/hildon-desktop-panel-window-composite.c:
	- fixed invalidation of the window area when the desktop window
	changes



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-06 12:04:21 UTC (rev 13638)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-06 12:53:08 UTC (rev 13639)
@@ -1,5 +1,11 @@
 2007-09-06 Johan Bilien  <johan.bilien at nokia.com>
 
+	* libhildondesktop/hildon-desktop-panel-window-composite.c:
+	- fixed invalidation of the window area when the desktop window
+	changes
+
+2007-09-06 Johan Bilien  <johan.bilien at nokia.com>
+
 	* src/hd-home-window.c: save the container when an applet is
 	removed, except when we are running the Select applets dialog,
 	in which case HDDesktop does it for us

Modified: projects/haf/trunk/hildon-desktop/debian/copyright
===================================================================
--- projects/haf/trunk/hildon-desktop/debian/copyright	2007-09-06 12:04:21 UTC (rev 13638)
+++ projects/haf/trunk/hildon-desktop/debian/copyright	2007-09-06 12:53:08 UTC (rev 13639)
@@ -1,4 +1,4 @@
-Copyright (c) 2006 Nokia Corporation.
+Copyright (c) 2006-2007 Nokia Corporation.
 
 hildon-desktop program is licensed under the terms of the GNU LGPL version 2.1.
 

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-window-composite.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-window-composite.c	2007-09-06 12:04:21 UTC (rev 13638)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-window-composite.c	2007-09-06 12:53:08 UTC (rev 13639)
@@ -269,18 +269,34 @@
         HildonDesktopPanelWindowComposite              *window = w->data;
         HildonDesktopPanelWindowCompositePrivate       *priv = window->priv;
 
-        if (priv->x + priv->width >= rects[i].x      &&
-            priv->x <= rects[i].x + rects[i].width   &&
-            priv->y + priv->height >= rects[i].y     &&
-            priv->y <= rects[i].y + rects[i].height)
+        if (priv->x + priv->width > rects[i].x      &&
+            priv->x < rects[i].x + rects[i].width   &&
+            priv->y + priv->height > rects[i].y     &&
+            priv->y < rects[i].y + rects[i].height)
 
         {
           GdkRectangle rect;
 
-          rect.x = rects[i].x;
-          rect.y = rects[i].y;
-          rect.width = rects[i].width;
-          rect.height = rects[i].height;
+          /* Take the intersection, and offset it back
+           * to relate to the Panel window geometry */
+          rect.x = MAX (rects[i].x, priv->x) - priv->x;
+          rect.y = MAX (rects[i].y, priv->y) - priv->y;
+          rect.width =
+              MIN (rects[i].x + rects[i].width,  priv->x + priv->width) -
+              MAX (rects[i].x, priv->x);
+          rect.height =
+              MIN (rects[i].y + rects[i].height,  priv->y + priv->height) -
+              MAX (rects[i].y, priv->y);
+
+#if 0
+          g_debug ("invalidating part of panel window %s: %i,%i %ix%i",
+                   gtk_widget_get_name (GTK_WIDGET (window)),
+                   rect.x,
+                   rect.y,
+                   rect.width,
+                   rect.height);
+#endif
+
           gdk_window_invalidate_rect (GTK_WIDGET (window)->window,
                                       &rect,
                                       TRUE);


More information about the maemo-commits mailing list