Add support for an extended style of _NET_WM_SYNC_REQUEST_COUNTER

If an application provides two values in _NET_WM_SYNC_REQUEST_COUNTER,
use that as a signal that the applications wants an extended behavior
where it can update the counter as well as the window manager. If the
application updates the counter to an odd value, updates of the
window are frozen until the counter is updated again to an even value.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
This commit is contained in:
Owen W. Taylor
2011-06-08 13:58:54 -04:00
parent 7d43bde019
commit 70c0d39fa7
5 changed files with 88 additions and 24 deletions

View File

@@ -1958,7 +1958,7 @@ event_callback (XEvent *event,
if (alarm_window != NULL)
{
XSyncValue value = ((XSyncAlarmNotifyEvent*)event)->counter_value;
guint64 new_counter_value;
gint64 new_counter_value;
new_counter_value = XSyncValueLow32 (value) + ((gint64)XSyncValueHigh32 (value) << 32);
meta_window_update_sync_request_counter (alarm_window, new_counter_value);
filter_out_event = TRUE; /* GTK doesn't want to see this really */