[mutter] Fix accounting of frozen with maximize/unmaximize



commit d8b0f213b299d0d1e6084caf5b8bef469005d465
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Fri Apr 23 19:08:59 2010 -0400

    Fix accounting of frozen with maximize/unmaximize
    
    The beginning maximization/unmaximization don't go through
    start_effect_simple(), so we need to freeze the window
    separately.
    
    Change MutterWindow.freeze_count to a signed integer for
    consistency with other counts, and so the logic for
    checking for errors works properly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=616546

 src/compositor/mutter-window.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/mutter-window.c b/src/compositor/mutter-window.c
index 44a5ff8..5116b31 100644
--- a/src/compositor/mutter-window.c
+++ b/src/compositor/mutter-window.c
@@ -47,7 +47,7 @@ struct _MutterWindowPrivate
    * texture */
   GdkRegion        *bounding_region;
 
-  guint             freeze_count;
+  gint              freeze_count;
 
   /*
    * These need to be counters rather than flags, since more plugins
@@ -1216,6 +1216,7 @@ mutter_window_maximize (MutterWindow       *self,
   clutter_actor_set_size (CLUTTER_ACTOR (self), old_rect->width, old_rect->height);
 
   self->priv->maximize_in_progress++;
+  mutter_window_freeze (self);
 
   if (!info->plugin_mgr ||
       !mutter_plugin_manager_event_maximize (info->plugin_mgr,
@@ -1226,6 +1227,7 @@ mutter_window_maximize (MutterWindow       *self,
 
     {
       self->priv->maximize_in_progress--;
+      mutter_window_thaw (self);
     }
 }
 
@@ -1243,6 +1245,7 @@ mutter_window_unmaximize (MutterWindow      *self,
   clutter_actor_set_size (CLUTTER_ACTOR (self), old_rect->width, old_rect->height);
 
   self->priv->unmaximize_in_progress++;
+  mutter_window_freeze (self);
 
   if (!info->plugin_mgr ||
       !mutter_plugin_manager_event_maximize (info->plugin_mgr,
@@ -1252,6 +1255,7 @@ mutter_window_unmaximize (MutterWindow      *self,
 					     new_rect->width, new_rect->height))
     {
       self->priv->unmaximize_in_progress--;
+      mutter_window_thaw (self);
     }
 }
 



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