From 5f77669ba8e88bb170fc256ddcf7b9b78d37680b Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 3 Oct 2012 22:48:16 -0400 Subject: [PATCH] Handle _NET_WM_SYNC_REQUEST_COUNTER updates without redraw It's possible that a client might update the (extended) _NET_WM_SYNC_REQUEST_COUNTER counter twice without actually drawing anything. In that case, we still should send a _NET_WM_FRAME_DRAWN message since it's hard for a client to know every case in which no damage is generated. For now, do it the easy way by forcing a stage repaint. https://bugzilla.gnome.org/show_bug.cgi?id=685463 --- src/compositor/meta-window-actor.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 2294fd549..17e0e25e6 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -942,6 +942,19 @@ meta_window_actor_thaw (MetaWindowActor *self) * don't know what real damage has happened. */ if (self->priv->needs_damage_all) meta_window_actor_damage_all (self); + else if (self->priv->frame_drawn_serial != 0) + { + /* A frame was marked by the client without actually doing any damage; + * we need to make sure that the pre_paint/post_paint functions + * get called, enabling us to send a _NET_WM_FRAME_DRAWN. We do a + * 1-pixel redraw to get consistent timing with non-empty frames. + */ + if (self->priv->mapped && !self->priv->needs_pixmap) + { + const cairo_rectangle_int_t clip = { 0, 0, 1, 1 }; + clutter_actor_queue_redraw_with_clip (self->priv->actor, &clip); + } + } } gboolean