[mutter/wip/frame-synchronization: 8/8] Handle _NET_WM_SYNC_REQUEST_COUNTER updates without redraw



commit 3691ef19ca1113f5994540476c5029b61d6683b5
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Oct 3 22:48:16 2012 -0400

    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.

 src/compositor/meta-window-actor.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index a091d13..00bb01e 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -970,6 +970,15 @@ 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.
+       */
+      ClutterActor *stage = clutter_actor_get_stage (CLUTTER_ACTOR (self));
+      clutter_stage_ensure_redraw (CLUTTER_STAGE (stage));
+    }
 }
 
 gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]