From 0d98c4fa7c29b9dec4da74380f4d0e695be53349 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 27 Apr 2010 18:45:22 -0400 Subject: fix XSYNCronization of resizes (especially with two monitors). 1) a ConfigureNotify must always follow a Sync notification 2) determine the final size of the window with its position else struts are not applied properly for (partly) maximized windows 3) set the sync counter to a value when managing a new window --- openbox/client.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'openbox/client.c') diff --git a/openbox/client.c b/openbox/client.c index 8acbf841..ae97606d 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1551,7 +1551,13 @@ void client_update_sync_request_counter(ObClient *self) if (OBT_PROP_GET32(self->window, NET_WM_SYNC_REQUEST_COUNTER, CARDINAL,&i)) { + XSyncValue val; + self->sync_counter = i; + + /* this must be set when managing a new window according to EWMH */ + XSyncIntToValue(&val, 0); + XSyncSetCounter(obt_display, self->sync_counter, val); } else self->sync_counter = None; } @@ -3082,9 +3088,11 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h, used to follow the same rules as above, but _Java_ Swing can't handle this. So just to appease Swing, when user = TRUE, we always send a synthetic ConfigureNotify to give the window its root coordinates. + Lastly, if force_reply is TRUE, we always send a + ConfigureNotify, which is needed during a resize with XSYNCronization. */ if ((!user && !resized && (rootmoved || force_reply)) || - (user && final && rootmoved)) + (user && ((!resized && force_reply) || (final && rootmoved)))) { XEvent event; -- cgit v1.2.3