[maemo-commits] [maemo-commits] r17095 - in projects/haf/trunk/libmatchbox2: . matchbox/comp-mgr

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jan 12 13:41:02 EET 2009
Author: gw
Date: 2009-01-12 13:40:22 +0200 (Mon, 12 Jan 2009)
New Revision: 17095

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
Log:
	* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c:
	Put brackets in the correct place so the EGLX pixmap is only renewed
	when the fullscreen state has changed. Also added code to check the 
	actor size and position against the X size and position and make sure 
	it is the same - to fix bug #95594


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-01-12 11:38:18 UTC (rev 17094)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-01-12 11:40:22 UTC (rev 17095)
@@ -1,3 +1,11 @@
+2008-01-08  Gordon Williams  <gordon.williams at collabora.co.uk>
+
+	* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c:
+	Put brackets in the correct place so the EGLX pixmap is only renewed
+	when the fullscreen state has changed. Also added code to check the 
+	actor size and position against the X size and position and make sure 
+	it is the same - to fix bug #95594
+
 2009-01-02  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
 	* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c

Modified: projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c	2009-01-12 11:38:18 UTC (rev 17094)
+++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c	2009-01-12 11:40:22 UTC (rev 17095)
@@ -846,17 +846,43 @@
       wm_client->window, MBWMClientWindowEWMHStateFullscreen);
 
   if (fullscreen != cclient->priv->fullscreen)
-    cclient->priv->fullscreen = fullscreen;
+    {
+      cclient->priv->fullscreen = fullscreen;
 
-  /* FIXME xmas fix -- ignore the invisible systemui dialog, because it
-   * would show as white window for some reason */
-  if (!(ctype == MBWMClientTypeMenu && wm_client->window &&
-      g_strcmp0 ("systemui", wm_client->window->name) == 0))
+      /* FIXME xmas fix -- ignore the invisible systemui dialog, because it
+       * would show as white window for some reason */
+      if (!(ctype == MBWMClientTypeMenu && wm_client->window &&
+          g_strcmp0 ("systemui", wm_client->window->name) == 0))
+        {
+          mb_wm_comp_mgr_clutter_fetch_texture (client);
+        }
+      else
+        g_debug("%s: skip systemui dialog", __FUNCTION__);
+    }
+
+  /* Detect if the X size or position is different to our size and position
+   * and re-adjust */
+  if (cclient->priv->actor && cclient->priv->texture)
     {
-      mb_wm_comp_mgr_clutter_fetch_texture (client);
+      MBGeometry geom;
+      gint x, y;
+      guint width, height;
+      mb_wm_client_get_coverage (client->wm_client, &geom);
+      clutter_actor_get_position(cclient->priv->actor, &x, &y);
+      clutter_actor_get_size(cclient->priv->texture, &width, &height);
+      if (geom.x != x ||
+          geom.y != y ||
+          geom.width != width ||
+          geom.height != height)
+        {
+          clutter_actor_set_position(cclient->priv->actor, geom.x, geom.y);
+          clutter_actor_set_size(cclient->priv->texture,
+                            geom.width, geom.height);
+          g_debug("%s: Position Changed : %d, %d, %d, %d -> %d, %d, %d, %d",
+              __FUNCTION__, x,y,width,height,
+              geom.x, geom.y, geom.width, geom.height);
+        }
     }
-  else
-    g_debug("%s: skip systemui dialog", __FUNCTION__);
 }
 
 static Bool


More information about the maemo-commits mailing list