Fix corner cases where _NET_WM_FRAME_DRAWN might be missed
The WM spec requires _NET_WM_FRAME_DRAWN to *always* be sent when there is an appropriate update to the sync counter value. We were potentially missing _NET_WM_FRAME_DRAWN when an application did a spontaneous update during an interactive resize and during effects. Refactor the code to always send _NET_WM_FRAME_DRAWN, even when a window is frozen. https://bugzilla.gnome.org/show_bug.cgi?id=693833
This commit is contained in:
@@ -9510,11 +9510,13 @@ void
|
||||
meta_window_update_sync_request_counter (MetaWindow *window,
|
||||
gint64 new_counter_value)
|
||||
{
|
||||
if (window->extended_sync_request_counter &&
|
||||
new_counter_value % 2 == 0)
|
||||
gboolean needs_frame_drawn = FALSE;
|
||||
gboolean no_delay_frame = FALSE;
|
||||
|
||||
if (window->extended_sync_request_counter && new_counter_value % 2 == 0)
|
||||
{
|
||||
window->needs_frame_drawn = TRUE;
|
||||
window->no_delay_frame = new_counter_value == window->sync_request_serial + 1;
|
||||
needs_frame_drawn = TRUE;
|
||||
no_delay_frame = new_counter_value == window->sync_request_serial + 1;
|
||||
}
|
||||
|
||||
window->sync_request_serial = new_counter_value;
|
||||
@@ -9547,6 +9549,10 @@ meta_window_update_sync_request_counter (MetaWindow *window,
|
||||
window->display->grab_latest_motion_y,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
if (needs_frame_drawn)
|
||||
meta_compositor_queue_frame_drawn (window->display->compositor, window,
|
||||
no_delay_frame);
|
||||
}
|
||||
#endif /* HAVE_XSYNC */
|
||||
|
||||
|
Reference in New Issue
Block a user