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



commit c25ae34809360aba8bc5fc6e922dccfd312064b9
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 cc2bd3f..0d43b36 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]