[vinagre] Remember correctly the maximized state and window size



commit 6ca1c63fe2968b470dea940231b3975471f22124
Author: Jonh Wendell <jwendell gnome org>
Date:   Fri Jan 29 16:34:10 2010 -0300

    Remember correctly the maximized state and window size

 vinagre/vinagre-window.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/vinagre/vinagre-window.c b/vinagre/vinagre-window.c
index 6e68969..fc0bc3c 100644
--- a/vinagre/vinagre-window.c
+++ b/vinagre/vinagre-window.c
@@ -165,11 +165,14 @@ vinagre_window_configure_event (GtkWidget         *widget,
 {
   VinagreWindow *window = VINAGRE_WINDOW (widget);
 
-  window->priv->width  = event->width;
-  window->priv->height = event->height;
+  if ((vinagre_cache_prefs_get_integer ("window", "window-state", 0) & GDK_WINDOW_STATE_MAXIMIZED) == 0)
+    {
+      window->priv->width  = event->width;
+      window->priv->height = event->height;
 
-  vinagre_cache_prefs_set_integer ("window", "window-width", window->priv->width);
-  vinagre_cache_prefs_set_integer ("window", "window-height", window->priv->height);
+      vinagre_cache_prefs_set_integer ("window", "window-width", window->priv->width);
+      vinagre_cache_prefs_set_integer ("window", "window-height", window->priv->height);
+    }
 
   return GTK_WIDGET_CLASS (vinagre_window_parent_class)->configure_event (widget, event);
 }



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