[five-or-more/arnaudb/wip/gtk4: 28/28] Fix size_allocate.



commit 2b841c74834570c7b6ed03d61a964c78d9e3fe91
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Mar 27 16:37:49 2020 +0100

    Fix size_allocate.

 src/window.vala | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/window.vala b/src/window.vala
index 5c8dc4b..b373027 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -119,9 +119,13 @@ private class GameWindow : ApplicationWindow
     {
         if (window_maximized || window_tiled)
             return;
-
-        window_width  = width;
-        window_height = height;
+        int? _window_width = null;
+        int? _window_height = null;
+        get_size (out _window_width, out _window_height);
+        if (_window_width == null || _window_height == null)
+            return;
+        window_width = (!) _window_width;
+        window_height = (!) _window_height;
     }
 
     private void score_cb ()


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