mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Always send _NET_WM_FRAME_DRAWN for newly created windows
Send a _NET_WM_FRAME_DRAWN for each newly created window, as required by the specification. This avoids a race where a window might be created frozen but already unfrozen by the time we first see fetch the counter value. Remove a duplicate call to meta_compositor_set_updates_frozen() which was called before the MetaWindowActor is created and hence did nothing. https://bugzilla.gnome.org/show_bug.cgi?id=694771
This commit is contained in:
parent
98b0a37442
commit
6e02fb80c4
@ -1562,6 +1562,12 @@ meta_window_actor_new (MetaWindow *window)
|
|||||||
meta_window_actor_set_updates_frozen (self,
|
meta_window_actor_set_updates_frozen (self,
|
||||||
meta_window_updates_are_frozen (priv->window));
|
meta_window_updates_are_frozen (priv->window));
|
||||||
|
|
||||||
|
/* If a window doesn't start off with updates frozen, we should
|
||||||
|
* we should send a _NET_WM_FRAME_DRAWN immediately after the first drawn.
|
||||||
|
*/
|
||||||
|
if (priv->window->extended_sync_request_counter && !priv->updates_frozen)
|
||||||
|
meta_window_actor_queue_frame_drawn (self, FALSE);
|
||||||
|
|
||||||
meta_window_actor_sync_actor_geometry (self, priv->window->placed);
|
meta_window_actor_sync_actor_geometry (self, priv->window->placed);
|
||||||
|
|
||||||
/* Hang our compositor window state off the MetaWindow for fast retrieval */
|
/* Hang our compositor window state off the MetaWindow for fast retrieval */
|
||||||
@ -2408,7 +2414,6 @@ meta_window_actor_post_paint (MetaWindowActor *self)
|
|||||||
|
|
||||||
frame->frame_drawn_time = meta_compositor_monotonic_time_to_server_time (display,
|
frame->frame_drawn_time = meta_compositor_monotonic_time_to_server_time (display,
|
||||||
g_get_monotonic_time ());
|
g_get_monotonic_time ());
|
||||||
|
|
||||||
ev.type = ClientMessage;
|
ev.type = ClientMessage;
|
||||||
ev.window = meta_window_get_xwindow (priv->window);
|
ev.window = meta_window_get_xwindow (priv->window);
|
||||||
ev.message_type = display->atom__NET_WM_FRAME_DRAWN;
|
ev.message_type = display->atom__NET_WM_FRAME_DRAWN;
|
||||||
|
@ -4558,10 +4558,6 @@ meta_window_create_sync_request_alarm (MetaWindow *window)
|
|||||||
|
|
||||||
window->sync_request_serial =
|
window->sync_request_serial =
|
||||||
XSyncValueLow32 (init) + ((gint64)XSyncValueHigh32 (init) << 32);
|
XSyncValueLow32 (init) + ((gint64)XSyncValueHigh32 (init) << 32);
|
||||||
|
|
||||||
/* if the value is odd, the window starts off with updates frozen */
|
|
||||||
meta_compositor_set_updates_frozen (window->display->compositor, window,
|
|
||||||
meta_window_updates_are_frozen (window));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user