From 7e685af06db0eab9a86d42c8bc4f6a26afe602ab Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 19 Jan 2015 22:49:47 +0100 Subject: 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 --- 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 1ca1afe04..77256da58 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 2fdfd145e..9216d0e83 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 fc5744ba0..b1ee78a87 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); -- cgit v1.2.1