[gnome-mines] Connect to size_allocate.



commit d0e824673e4c1a26a9345d2c1776de659de8e358
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Mon Feb 2 04:54:36 2015 +0100

    Connect to size_allocate.

 src/gnome-mines.vala |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index 26e0777..1e5540f 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -202,7 +202,7 @@ public class Mines : Gtk.Application
         add_action (settings.create_action (KEY_USE_QUESTION_MARKS));
 
         window = (Gtk.ApplicationWindow) ui_builder.get_object ("main_window");
-        window.configure_event.connect (window_configure_event_cb);
+        window.size_allocate.connect (size_allocate_cb);
         window.window_state_event.connect (window_state_event_cb);
         window.focus_out_event.connect (window_focus_out_event_cb);
         window.focus_in_event.connect (window_focus_in_event_cb);
@@ -384,17 +384,15 @@ public class Mines : Gtk.Application
         custom_game_screen.show_all ();
     }
 
-    private bool window_configure_event_cb (Gdk.EventConfigure event)
+    private void size_allocate_cb (Gtk.Allocation allocation)
     {
         if (!is_maximized && !window_skip_configure)
         {
-            window_width = event.width;
-            window_height = event.height;
+            window_width = allocation.width;
+            window_height = allocation.height;
         }
 
         window_skip_configure = false;
-
-        return false;
     }
 
     private bool window_state_event_cb (Gdk.EventWindowState event)


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