[gnome-dictionary] app: Store the appropriate window size



commit 5a8a2685a167190c84b7c12ccc9bf8beb8590563
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Aug 31 16:48:25 2016 +0100

    app: Store the appropriate window size
    
    We cannot use the window's allocation, because that will not take into
    account client side decorations.

 src/gdict-window.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gdict-window.c b/src/gdict-window.c
index 4e56096..8ce0121 100644
--- a/src/gdict-window.c
+++ b/src/gdict-window.c
@@ -1297,15 +1297,15 @@ gdict_window_size_allocate (GtkWidget     *widget,
 {
   GdictWindow *window = GDICT_WINDOW (widget);
 
+  if (GTK_WIDGET_CLASS (gdict_window_parent_class)->size_allocate != NULL)
+    GTK_WIDGET_CLASS (gdict_window_parent_class)->size_allocate (widget, allocation);
+
   if (!window->is_maximized)
     {
-      window->current_width = allocation->width;
-      window->current_height = allocation->height;
+      gtk_window_get_size (GTK_WINDOW (widget),
+                           &window->current_width,
+                           &window->current_height);
     }
-
-  if (GTK_WIDGET_CLASS (gdict_window_parent_class)->size_allocate)
-    GTK_WIDGET_CLASS (gdict_window_parent_class)->size_allocate (widget,
-                                                                allocation);
 }
 
 static void


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