[five-or-more/arnaudb/wip/gtk4: 11/29] Configure event is gone.



commit c8577730b38af2275d221150c07d6ba2838b7771
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Mar 12 21:32:23 2020 +0100

    Configure event is gone.

 src/view.vala | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/view.vala b/src/view.vala
index 74dd336..f0e7708 100644
--- a/src/view.vala
+++ b/src/view.vala
@@ -62,6 +62,7 @@ private class View : DrawingArea
 
         init_keyboard ();
         init_mouse ();
+        size_allocate.connect (on_size_allocate);
 
         cs = get_style_context ();
         provider = new CssProvider ();
@@ -333,12 +334,9 @@ private class View : DrawingArea
         board_rectangle.height = piece_size * game.n_rows;
     }
 
-    protected override bool configure_event (Gdk.EventConfigure event)
+    private inline void on_size_allocate (int width, int height)
     {
-        update_sizes (event.width, event.height);
-        queue_draw ();
-
-        return true;
+        update_sizes (width, height);
     }
 
     private void fill_background (Cairo.Context cr)


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