summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-04-27 18:45:22 -0400
committerDana Jansens <danakj@orodu.net>2010-04-28 12:58:46 -0400
commit0d98c4fa7c29b9dec4da74380f4d0e695be53349 (patch)
tree64470fc1b2094f52f096022898c582ac181a0536 /openbox/client.c
parentb3023ac55b90d63cf8d5b21fb49a124f247f7e34 (diff)
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
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c10
1 files changed, 9 insertions, 1 deletions
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;