summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <fourdan@xfce.org>2015-01-19 22:49:47 +0100
committerOlivier Fourdan <fourdan@xfce.org>2015-01-19 22:54:04 +0100
commit7e685af06db0eab9a86d42c8bc4f6a26afe602ab (patch)
tree7b29471ea6f0ebd16ace4fce8609a5091baee545
parent7a31a8884ed9f1277cdfb4898747c585d6169292 (diff)
downloadxfwm4-7e685af06db0eab9a86d42c8bc4f6a26afe602ab.tar.gz
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@xfce.org>
-rw-r--r--src/client.h1
-rw-r--r--src/moveresize.c7
-rw-r--r--src/xsync.c6
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);