[five-or-more/arnaudb/wip/gtk4: 3/3] Fix size_allocate.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [five-or-more/arnaudb/wip/gtk4: 3/3] Fix size_allocate.
- Date: Fri, 27 Mar 2020 16:31:09 +0000 (UTC)
commit 2afa7ac1ce9dd81a59fae5a29ea41c0241ce013e
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 fa52e32..6f30cea 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]