[five-or-more/arnaudb/gtk3: 11/24] Revert "Adapt size_allocate stuff."
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [five-or-more/arnaudb/gtk3: 11/24] Revert "Adapt size_allocate stuff."
- Date: Thu, 22 Oct 2020 15:32:54 +0000 (UTC)
commit ef0f7e17b8f31adb92a21fc934709313e30bffb2
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Oct 22 17:28:21 2020 +0200
Revert "Adapt size_allocate stuff."
This reverts commit 1805e8820adaa44a0ef67e256794d8dc26705577.
src/window.vala | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/window.vala b/src/window.vala
index 74b4f24..52d754a 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -129,7 +129,6 @@ private class GameWindow : ApplicationWindow
assert_not_reached ();
surface = (Gdk.Toplevel) (!) nullable_surface;
surface.notify ["state"].connect (on_window_state_event);
- surface.size_changed.connect (on_size_changed);
}
private Gdk.Toplevel surface;
@@ -146,12 +145,15 @@ private class GameWindow : ApplicationWindow
window_tiled = (state & tiled_state) != 0;
}
- private inline void on_size_changed (int width, int height)
+ protected override void size_allocate (Allocation allocation)
{
+ base.size_allocate (allocation);
+
if (window_maximized || window_tiled)
return;
- window_width = width;
- window_height = height;
+
+ window_width = allocation.width;
+ window_height = allocation.height;
}
internal inline void on_shutdown ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]