[Xfce4-commits] r26815 - xfwm4/trunk/src

Olivier Fourdan olivier at xfce.org
Thu Apr 10 23:28:10 CEST 2008


Author: olivier
Date: 2008-04-10 21:28:10 +0000 (Thu, 10 Apr 2008)
New Revision: 26815

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/frame.c
   xfwm4/trunk/src/frame.h
   xfwm4/trunk/src/netwm.c
   xfwm4/trunk/src/settings.h
Log:
Redraw frame immediately in case of resize to avoid confusing the compositor

Modified: xfwm4/trunk/src/client.c
===================================================================
--- xfwm4/trunk/src/client.c	2008-04-10 10:25:14 UTC (rev 26814)
+++ xfwm4/trunk/src/client.c	2008-04-10 21:28:10 UTC (rev 26815)
@@ -661,10 +661,14 @@
         change_values.height = frameHeight (c);
         XConfigureWindow (clientGetXDisplay (c), c->frame, change_mask, &change_values);
 
-        if (WIN_RESIZED || (flags & CFG_FORCE_REDRAW))
+        if (WIN_RESIZED)
         {
-            frameQueueDraw (c, (flags & CFG_FORCE_REDRAW));
+            frameDraw (c, FALSE);
         }
+        else if (flags & CFG_FORCE_REDRAW)
+        {
+            frameQueueDraw (c, TRUE);
+        }
 
         change_values.x = frameLeft (c);
         change_values.y = frameTop (c);

Modified: xfwm4/trunk/src/frame.c
===================================================================
--- xfwm4/trunk/src/frame.c	2008-04-10 10:25:14 UTC (rev 26814)
+++ xfwm4/trunk/src/frame.c	2008-04-10 21:28:10 UTC (rev 26815)
@@ -393,7 +393,7 @@
     }
     else
     {
-        w3 = logical_rect.width;
+        w3 = logical_rect.width + screen_info->params->title_shadow[state];
         w5 = width;
         if (w3 > width - w2 - w4)
         {
@@ -830,8 +830,8 @@
     XDestroyWindow (display_info->dpy, shape_win);
 }
 
-void
-frameDraw (Client * c)
+static void
+frameDrawAll (Client * c)
 {
     ScreenInfo *screen_info;
     FramePixmap frame_pix;
@@ -1180,7 +1180,7 @@
     c = (Client *) data;
     g_return_val_if_fail (c, FALSE);
 
-    frameDraw (c);
+    frameDrawAll (c);
     c->frame_timeout_id = 0;
 
     return FALSE;
@@ -1201,6 +1201,20 @@
 }
 
 void
+frameDraw (Client * c, gboolean clear_all)
+{
+    g_return_if_fail (c);
+
+    TRACE ("entering frameDraw for \"%s\" (0x%lx)", c->name, c->window);
+
+    if (clear_all)
+    {
+        FLAG_SET (c->xfwm_flags, XFWM_FLAG_NEEDS_REDRAW);
+    }
+    frameDrawAll (c);
+}
+
+void
 frameQueueDraw (Client * c, gboolean clear_all)
 {
     g_return_if_fail (c);

Modified: xfwm4/trunk/src/frame.h
===================================================================
--- xfwm4/trunk/src/frame.h	2008-04-10 10:25:14 UTC (rev 26814)
+++ xfwm4/trunk/src/frame.h	2008-04-10 21:28:10 UTC (rev 26815)
@@ -42,9 +42,10 @@
 int                      frameY                                 (Client *);
 int                      frameWidth                             (Client *);
 int                      frameHeight                            (Client *);
-void                     frameDraw                              (Client *);
 void                     frameClearQueueDraw                    (Client *);
 void                     frameQueueDraw                         (Client *,
                                                                  gboolean);
+void                     frameDraw                              (Client *,
+                                                                 gboolean);
 
 #endif /* INC_FRAME_H */

Modified: xfwm4/trunk/src/netwm.c
===================================================================
--- xfwm4/trunk/src/netwm.c	2008-04-10 10:25:14 UTC (rev 26814)
+++ xfwm4/trunk/src/netwm.c	2008-04-10 21:28:10 UTC (rev 26815)
@@ -467,19 +467,16 @@
         {
             if ((action == NET_WM_STATE_ADD) && !FLAG_TEST (c->flags, CLIENT_FLAG_BELOW))
             {
-                compositorDamageWindow (display_info, c->frame);
                 FLAG_SET (c->flags, CLIENT_FLAG_BELOW);
                 clientUpdateBelowState (c);
             }
             else if ((action == NET_WM_STATE_REMOVE) && FLAG_TEST (c->flags, CLIENT_FLAG_BELOW))
             {
-                compositorDamageWindow (display_info, c->frame);
                 FLAG_UNSET (c->flags, CLIENT_FLAG_BELOW);
                 clientUpdateBelowState (c);
             }
             else if (action == NET_WM_STATE_TOGGLE)
             {
-                compositorDamageWindow (display_info, c->frame);
                 FLAG_TOGGLE (c->flags, CLIENT_FLAG_BELOW);
                 clientUpdateBelowState (c);
             }

Modified: xfwm4/trunk/src/settings.h
===================================================================
--- xfwm4/trunk/src/settings.h	2008-04-10 10:25:14 UTC (rev 26814)
+++ xfwm4/trunk/src/settings.h	2008-04-10 21:28:10 UTC (rev 26815)
@@ -35,9 +35,9 @@
 
 enum
 {
-    TITLE_SHADOW_NONE,
-    TITLE_SHADOW_UNDER,
-    TITLE_SHADOW_FRAME
+    TITLE_SHADOW_NONE  = 0,
+    TITLE_SHADOW_UNDER = 1,
+    TITLE_SHADOW_FRAME = 2
 };
 
 #define FIRST_KEY KEY_ADD_WORKSPACE



More information about the Xfce4-commits mailing list