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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Aug 26 18:54:15 EEST 2009
Author: kihamala
Date: 2009-08-26 18:54:12 +0300 (Wed, 26 Aug 2009)
New Revision: 19214

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/debian/changelog
   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.h
Log:
releasing


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-08-26 14:02:48 UTC (rev 19213)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-08-26 15:54:12 UTC (rev 19214)
@@ -1,3 +1,14 @@
+2009-08-26  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
+
+	Release 0.2.58
+
+	* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.[ch]
+	(mb_wm_comp_mgr_clutter_set_client_redirection): Make public and
+	(un)redirect child windows as well.
+	(mb_wm_comp_mgr_clutter_handle_damage): Track damage based on new
+	'damage_handling_off' priv member.
+	Almost Fixes: NB#126626
+
 2009-08-19  Adam Endrodi  <adam.endrodi at blumsoft.eu>
 
 	Made frequently used functions inline.  Based on measurements

Modified: projects/haf/trunk/libmatchbox2/debian/changelog
===================================================================
--- projects/haf/trunk/libmatchbox2/debian/changelog	2009-08-26 14:02:48 UTC (rev 19213)
+++ projects/haf/trunk/libmatchbox2/debian/changelog	2009-08-26 15:54:12 UTC (rev 19214)
@@ -1,8 +1,9 @@
-matchbox-window-manager-2 (0.2.58-1~unreleased) unstable; urgency=low
+matchbox-window-manager-2 (0.2.58-1) unstable; urgency=low
 
-  * foo
+  * Fixes: NB#126626 - Switching between non/composite modes, make screen
+    blank for short time  (not a complete fix but improvement)
 
- -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Wed, 19 Aug 2009 13:28:26 +0300
+ -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Wed, 26 Aug 2009 18:52:04 +0300
 
 matchbox-window-manager-2 (0.2.57-1) unstable; urgency=low
 

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-08-26 14:02:48 UTC (rev 19213)
+++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c	2009-08-26 15:54:12 UTC (rev 19214)
@@ -75,6 +75,7 @@
   unsigned int            flags;
   Bool                    fullscreen;
   Damage                  window_damage;
+  Bool                    damage_handling_off;
   Bool                    bound;
 
   /* have we been unmapped - if so we need to re-create our texture when
@@ -162,16 +163,30 @@
 
 /* Clutter sets XComposite redirection for windows corresponding to textures;
  * this function is used to toggle redirection within Clutter. */
-void  __attribute__ ((visibility("hidden")))
+void
 mb_wm_comp_mgr_clutter_set_client_redirection (MBWMCompMgrClient *client,
                                                gboolean setting)
 {
   MBWMCompMgrClutterClient *cclient = MB_WM_COMP_MGR_CLUTTER_CLIENT(client);
 
+  mb_wm_util_trap_x_errors ();
+  XGrabServer (client->wm->xdpy);
   if (cclient->priv->texture)
     clutter_x11_texture_pixmap_set_redirection (
           CLUTTER_X11_TEXTURE_PIXMAP (cclient->priv->texture),
           setting);
+
+  if (setting && client->wm_client)
+    XCompositeRedirectSubwindows (client->wm->xdpy,
+                                  client->wm_client->xwin_frame,
+                                  CompositeRedirectManual);
+  else if (client->wm_client)
+    XCompositeUnredirectSubwindows (client->wm->xdpy,
+                                    client->wm_client->xwin_frame,
+                                    CompositeRedirectManual);
+  XSync (client->wm->xdpy, False);
+  XUngrabServer (client->wm->xdpy);
+  mb_wm_util_untrap_x_errors ();
 }
 
 /**
@@ -195,11 +210,6 @@
   if (!(cclient->priv->flags & MBWMCompMgrClutterClientMapped))
     return;
 
-  Bool fullscreen;
-
-  fullscreen = mb_wm_client_window_is_state_set (
-      wm_client->window, MBWMClientWindowEWMHStateFullscreen);
-
   xwin = wm_client->window->xwindow;
 
   mb_wm_comp_mgr_clutter_client_set_size(cclient, FALSE);
@@ -739,7 +749,7 @@
 
   MBWM_NOTE (COMPOSITOR, "REPAIRING %lx", client->wm_client->window->xwindow);
 
-  if (!cclient->priv->actor)
+  if (!cclient->priv->actor || cclient->priv->damage_handling_off)
     return;
 
   if (!cclient->priv->bound)
@@ -812,18 +822,23 @@
 {
   MBWindowManager           * wm   = mgr->wm;
   MBWindowManagerClient     * c;
-  Damage                      damage;
+  MBWMCompMgrClutterClient  * cclient;
 
-  if (wm->non_redirection)
-    /* avoid some Clutter/EGL errors when in non-composited mode */
-    return False;
-
   c = mb_wm_managed_client_from_frame (wm, de->drawable);
+  if (!c || !c->cm_client)
+    {
+      MBWM_NOTE (COMPOSITOR, "Failed to find client for window %lx\n",
+                 de->drawable);
+      g_debug ("Failed to find client for window %lx\n",
+               de->drawable);
+      return False;
+    }
 
-  if (c && c->cm_client)
+  cclient = MB_WM_COMP_MGR_CLUTTER_CLIENT (c->cm_client);
+
+  if (!cclient->priv->damage_handling_off)
     {
-      MBWMCompMgrClutterClient *cclient =
-	MB_WM_COMP_MGR_CLUTTER_CLIENT (c->cm_client);
+      Damage damage;
       int err;
 
 /* We ignore the DontUpdate flag for i386, as it uses the X11 Texture Pixmap
@@ -862,13 +877,6 @@
       if ((err = mb_wm_util_untrap_x_errors ()))
         g_debug ("%s: X error %d", __func__, err);
     }
-  else
-    {
-      MBWM_NOTE (COMPOSITOR, "Failed to find client for window %lx\n",
-		 de->drawable);
-      g_debug ("Failed to find client for window %lx\n",
-		 de->drawable);
-    }
 
   return False;
 }
@@ -1007,11 +1015,14 @@
   MBWindowManager *wm = MB_WM_COMP_MGR_CLIENT (cclient)->wm;
   MBWindowManagerClient *c = MB_WM_COMP_MGR_CLIENT (cclient)->wm_client;
 
-  /* printf ("%s: client win %lx\n", __func__,
+  /* g_printerr ("%s: client win %lx\n", __func__,
           c && c->window ? c->window->xwindow : 0); */
 
-  if (track_damage)
+  if (track_damage && (cclient->priv->damage_handling_off
+                       || !cclient->priv->window_damage))
     {
+      cclient->priv->damage_handling_off = False;
+
       if (!cclient->priv->window_damage)
         {
           cclient->priv->window_damage = XDamageCreate (wm->xdpy,
@@ -1036,25 +1047,33 @@
                 }
             }
         }
+      else
+        {
+          mb_wm_comp_mgr_clutter_fetch_texture (
+                                MB_WM_COMP_MGR_CLIENT (cclient));
+          XDamageSubtract (wm->xdpy, cclient->priv->window_damage, None, None);
+        }
     }
-  else if (cclient->priv->window_damage)
+  else if (!track_damage)
     {
-      int err;
+      if (cclient->priv->window_damage)
+        {
+          int err;
+          mb_wm_util_trap_x_errors();
+          XDamageDestroy (wm->xdpy, cclient->priv->window_damage);
+          XSync (wm->xdpy, False);
+          if ((err = mb_wm_util_untrap_x_errors()) != 0)
+            g_debug ("XDamageDestroy(0x%lx) for %p: %d",
+                     cclient->priv->window_damage, c, err);
+          cclient->priv->window_damage = 0;
+        }
 
-      /* Sing after me: "untrap" without XSync() is un*re*li*ab*le! */
-      mb_wm_util_trap_x_errors();
-      XDamageDestroy (wm->xdpy, cclient->priv->window_damage);
-      XSync (wm->xdpy, False);
-      if ((err = mb_wm_util_untrap_x_errors()) != 0)
-        g_debug ("XDamageDestroy(0x%lx) for %p: %d",
-                 cclient->priv->window_damage, c, err);
-      cclient->priv->window_damage = 0;
-
       if (cclient->priv->texture)
         /* release the window in Clutter */
         clutter_x11_texture_pixmap_set_window (
                 CLUTTER_X11_TEXTURE_PIXMAP (cclient->priv->texture),
                 0, FALSE);
+      cclient->priv->damage_handling_off = True;
     }
 }
 

Modified: projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.h
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.h	2009-08-26 14:02:48 UTC (rev 19213)
+++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.h	2009-08-26 15:54:12 UTC (rev 19214)
@@ -123,7 +123,7 @@
 ClutterActor *
 mb_wm_comp_mgr_clutter_get_arena (MBWMCompMgrClutter *cmgr);
 
-void  __attribute__ ((visibility("hidden")))
+void
 mb_wm_comp_mgr_clutter_set_client_redirection (MBWMCompMgrClient *client,
                                                gboolean setting);
 

More information about the maemo-commits mailing list