[gtk+] gtk-demo: Fix the size saving for CSD



commit fc90bd5e302f0146ee7fa4cdcaf06b6ffef41e7c
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Feb 14 09:29:55 2016 -0500

    gtk-demo: Fix the size saving for CSD
    
    We need to use gtk_window_get_size to get the correct size that
    we can pass to gtk_window_set_default_size regardless of CSD
    or not.

 demos/gtk-demo/application.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/demos/gtk-demo/application.c b/demos/gtk-demo/application.c
index 195eb61..c85102d 100644
--- a/demos/gtk-demo/application.c
+++ b/demos/gtk-demo/application.c
@@ -487,10 +487,7 @@ demo_application_window_size_allocate (GtkWidget     *widget,
   GTK_WIDGET_CLASS (demo_application_window_parent_class)->size_allocate (widget, allocation);
 
   if (!window->maximized && !window->fullscreen)
-    {
-      window->width = allocation->width;
-      window->height = allocation->height;
-    }
+    gtk_window_get_size (GTK_WINDOW (window), &window->width, &window->height);
 }
 
 static gboolean


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