[mutter] MetaWindowActor: fix updates with multiple size changes in one frame
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] MetaWindowActor: fix updates with multiple size changes in one frame
- Date: Wed, 25 Sep 2013 17:17:16 +0000 (UTC)
commit 7b84590c71f2bcb72ab595eee5899e0a24c697f0
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Sep 25 13:13:19 2013 -0400
MetaWindowActor: fix updates with multiple size changes in one frame
We must set size_changed even if we are frozen, as every window
size change makes the X server drop the pixmap, and we might lose
the information at the next thaw() if the window changes size
twice in one frame (so we would keep drawing with the old pixmap
until something else causes another resize)
Fix done together with Giovanni Campagna <gcampagn redhat com>
src/compositor/meta-window-actor.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 63c12c0..7dc8bf0 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1430,6 +1430,16 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
MetaWindowActorPrivate *priv = self->priv;
MetaRectangle window_rect;
+ meta_window_get_input_rect (priv->window, &window_rect);
+
+ if (priv->last_width != window_rect.width ||
+ priv->last_height != window_rect.height)
+ {
+ priv->size_changed = TRUE;
+ priv->last_width = window_rect.width;
+ priv->last_height = window_rect.height;
+ }
+
/* Normally we want freezing a window to also freeze its position; this allows
* windows to atomically move and resize together, either under app control,
* or because the user is resizing from the left/top. But on initial placement
@@ -1440,17 +1450,10 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
if (is_frozen (self) && !did_placement)
return;
- meta_window_get_input_rect (priv->window, &window_rect);
-
- if (priv->last_width != window_rect.width ||
- priv->last_height != window_rect.height)
+ if (priv->size_changed)
{
- priv->size_changed = TRUE;
meta_window_actor_queue_create_pixmap (self);
meta_window_actor_update_shape (self);
-
- priv->last_width = window_rect.width;
- priv->last_height = window_rect.height;
}
if (meta_window_actor_effect_in_progress (self))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]