[Xfce4-commits] [xfce/xfwm4] 04/04: Avoid spurious configure

noreply at xfce.org noreply at xfce.org
Mon Jan 19 22:54:33 CET 2015


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit 7e685af06db0eab9a86d42c8bc4f6a26afe602ab
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Mon Jan 19 22:49:47 2015 +0100

    Avoid spurious configure
    
    Apps supporting extended XSync counter may update their XSync counter
    which can cause spurious window reconfigure.
    
    Add a flag to indicate if we ought to allow these reconfigurations.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/client.h     |    1 +
 src/moveresize.c |    7 ++++++-
 src/xsync.c      |    6 ++++--
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/client.h b/src/client.h
index 1ca1afe..77256da 100644
--- a/src/client.h
+++ b/src/client.h
@@ -170,6 +170,7 @@
 #define CLIENT_FLAG_XSYNC_WAITING       (1L<<22)
 #define CLIENT_FLAG_XSYNC_ENABLED       (1L<<23)
 #define CLIENT_FLAG_XSYNC_EXT_COUNTER   (1L<<24)
+#define CLIENT_FLAG_XSYNC_CONFIGURE     (1L<<25)
 
 #define WM_FLAG_DELETE                  (1L<<0)
 #define WM_FLAG_INPUT                   (1L<<1)
diff --git a/src/moveresize.c b/src/moveresize.c
index 2fdfd14..9216d0e 100644
--- a/src/moveresize.c
+++ b/src/moveresize.c
@@ -1693,7 +1693,11 @@ clientResize (Client * c, int handle, XEvent * ev)
         return;
     }
 
-    if (screen_info->params->box_resize && screen_info->compositor_active)
+    if (!screen_info->params->box_resize)
+    {
+        FLAG_SET (c->flags, CLIENT_FLAG_XSYNC_CONFIGURE);
+    }
+    else if (screen_info->compositor_active)
     {
         passdata.wireframe = wireframeCreate (c);
     }
@@ -1730,6 +1734,7 @@ clientResize (Client * c, int handle, XEvent * ev)
     eventFilterPop (display_info->xfilter);
     TRACE ("leaving resize loop");
     FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING);
+    FLAG_UNSET (c->flags, CLIENT_FLAG_XSYNC_CONFIGURE);
 
     if (passdata.poswin)
     {
diff --git a/src/xsync.c b/src/xsync.c
index fc5744b..b1ee78a 100644
--- a/src/xsync.c
+++ b/src/xsync.c
@@ -171,8 +171,10 @@ clientXSyncClearTimeout (Client * c)
     TRACE ("entering clientXSyncClearTimeout");
 
     FLAG_UNSET (c->flags, CLIENT_FLAG_XSYNC_WAITING);
-    clientReconfigure (c, NO_CFG_FLAG);
-
+    if (FLAG_TEST (c->flags, CLIENT_FLAG_XSYNC_CONFIGURE))
+    {
+        clientReconfigure (c, NO_CFG_FLAG);
+    }
     if (c->xsync_timeout_id)
     {
         g_source_remove (c->xsync_timeout_id);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list