[gnome-clocks] Fix window size saving



commit 866b5f61fde0bce61b770a9e2f6f49303ef9a1d3
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 15 22:28:09 2016 -0400

    Fix window size saving
    
    GTK+ 3.20 changed behavior here to accommodate CSD differences.
    Update the code to follow the recommendations in
    https://wiki.gnome.org/HowDoI/SaveWindowState
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763381

 src/window.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/window.vala b/src/window.vala
index b6950f3..165337f 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -187,7 +187,10 @@ public class Window : Gtk.ApplicationWindow {
 
     protected override bool configure_event (Gdk.EventConfigure event) {
         if (get_realized () && !(Gdk.WindowState.MAXIMIZED in get_window ().get_state ())) {
-            settings.set ("size", "(ii)", event.width, event.height);
+            int width, height;
+
+            get_size (out width, out height);
+            settings.set ("size", "(ii)", width, height);
         }
 
         return base.configure_event (event);


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