[gnome-tetravex/arnaudb/wip/gtk4] Fix size_allocate.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex/arnaudb/wip/gtk4] Fix size_allocate.
- Date: Wed, 1 Apr 2020 16:26:27 +0000 (UTC)
commit 18fe493a641c656a0ca203b421d48945b147eadd
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Apr 1 18:25:56 2020 +0200
Fix size_allocate.
src/gnome-tetravex.vala | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index 697e379..183c46b 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -538,9 +538,13 @@ private class Tetravex : Gtk.Application
{
if (window_is_maximized || window_is_tiled || window_is_fullscreen)
return;
-
- window_width = width;
- window_height = height;
+ int? _window_width = null;
+ int? _window_height = null;
+ window.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 init_state_watcher ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]