mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 12:12:25 +00:00
Revert "x11: Cut some slack to clients doing slow draws/resizes"
As per https://bugzilla.gnome.org/show_bug.cgi?id=740424#c12
This reverts commit 94c3c8f412
.
This commit is contained in:
parent
6bacbac656
commit
68ba45bcb2
@ -949,23 +949,6 @@ sync_request_timeout (gpointer data)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
reset_sync_request_timeout (MetaWindow *window)
|
|
||||||
{
|
|
||||||
if (window->sync_request_timeout_id != 0)
|
|
||||||
g_source_remove (window->sync_request_timeout_id);
|
|
||||||
|
|
||||||
/* We give the window 1 sec to respond to _NET_WM_SYNC_REQUEST;
|
|
||||||
* if this time expires, we consider the window unresponsive
|
|
||||||
* and resize it unsynchonized.
|
|
||||||
*/
|
|
||||||
window->sync_request_timeout_id = g_timeout_add (1000,
|
|
||||||
sync_request_timeout,
|
|
||||||
window);
|
|
||||||
g_source_set_name_by_id (window->sync_request_timeout_id,
|
|
||||||
"[mutter] sync_request_timeout");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
send_sync_request (MetaWindow *window)
|
send_sync_request (MetaWindow *window)
|
||||||
{
|
{
|
||||||
@ -1004,7 +987,15 @@ send_sync_request (MetaWindow *window)
|
|||||||
XSendEvent (window->display->xdisplay,
|
XSendEvent (window->display->xdisplay,
|
||||||
window->xwindow, False, 0, (XEvent*) &ev);
|
window->xwindow, False, 0, (XEvent*) &ev);
|
||||||
|
|
||||||
reset_sync_request_timeout (window);
|
/* We give the window 1 sec to respond to _NET_WM_SYNC_REQUEST;
|
||||||
|
* if this time expires, we consider the window unresponsive
|
||||||
|
* and resize it unsynchonized.
|
||||||
|
*/
|
||||||
|
window->sync_request_timeout_id = g_timeout_add (1000,
|
||||||
|
sync_request_timeout,
|
||||||
|
window);
|
||||||
|
g_source_set_name_by_id (window->sync_request_timeout_id,
|
||||||
|
"[mutter] sync_request_timeout");
|
||||||
|
|
||||||
meta_compositor_sync_updates_frozen (window->display->compositor, window);
|
meta_compositor_sync_updates_frozen (window->display->compositor, window);
|
||||||
}
|
}
|
||||||
@ -3347,25 +3338,20 @@ meta_window_x11_update_sync_request_counter (MetaWindow *window,
|
|||||||
window->sync_request_serial = new_counter_value;
|
window->sync_request_serial = new_counter_value;
|
||||||
meta_compositor_sync_updates_frozen (window->display->compositor, window);
|
meta_compositor_sync_updates_frozen (window->display->compositor, window);
|
||||||
|
|
||||||
if (window->sync_request_timeout_id)
|
|
||||||
{
|
|
||||||
if (new_counter_value < window->sync_request_wait_serial)
|
|
||||||
{
|
|
||||||
reset_sync_request_timeout (window);
|
|
||||||
}
|
|
||||||
else if (!window->extended_sync_request_counter || new_counter_value % 2 == 0)
|
|
||||||
{
|
|
||||||
g_source_remove (window->sync_request_timeout_id);
|
|
||||||
window->sync_request_timeout_id = 0;
|
|
||||||
|
|
||||||
if (window == window->display->grab_window &&
|
if (window == window->display->grab_window &&
|
||||||
meta_grab_op_is_resizing (window->display->grab_op))
|
meta_grab_op_is_resizing (window->display->grab_op) &&
|
||||||
|
new_counter_value >= window->sync_request_wait_serial &&
|
||||||
|
(!window->extended_sync_request_counter || new_counter_value % 2 == 0) &&
|
||||||
|
window->sync_request_timeout_id)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_RESIZING,
|
meta_topic (META_DEBUG_RESIZING,
|
||||||
"Alarm event received last motion x = %d y = %d\n",
|
"Alarm event received last motion x = %d y = %d\n",
|
||||||
window->display->grab_latest_motion_x,
|
window->display->grab_latest_motion_x,
|
||||||
window->display->grab_latest_motion_y);
|
window->display->grab_latest_motion_y);
|
||||||
|
|
||||||
|
g_source_remove (window->sync_request_timeout_id);
|
||||||
|
window->sync_request_timeout_id = 0;
|
||||||
|
|
||||||
/* This means we are ready for another configure;
|
/* This means we are ready for another configure;
|
||||||
* no pointer round trip here, to keep in sync */
|
* no pointer round trip here, to keep in sync */
|
||||||
meta_window_update_resize (window,
|
meta_window_update_resize (window,
|
||||||
@ -3374,8 +3360,6 @@ meta_window_x11_update_sync_request_counter (MetaWindow *window,
|
|||||||
window->display->grab_latest_motion_y,
|
window->display->grab_latest_motion_y,
|
||||||
TRUE);
|
TRUE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If sync was previously disabled, turn it back on and hope
|
/* If sync was previously disabled, turn it back on and hope
|
||||||
* the application has come to its senses (maybe it was just
|
* the application has come to its senses (maybe it was just
|
||||||
|
Loading…
Reference in New Issue
Block a user