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



commit 064d6135a486db23940cb33ac9e073dba0f8b132
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 7a44411..ba2f0b5 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -120,9 +120,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]