[dconf-editor] Improve tiled state detection.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Improve tiled state detection.
- Date: Fri, 15 Feb 2019 11:21:21 +0000 (UTC)
commit 448d8611dfacd54fbc6f0be2def9bef1583e05a1
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Feb 15 12:20:52 2019 +0100
Improve tiled state detection.
Gdk.WindowState.TILED is deprecated.
editor/adaptative-window.vala | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/editor/adaptative-window.vala b/editor/adaptative-window.vala
index e8b731d..2140f0f 100644
--- a/editor/adaptative-window.vala
+++ b/editor/adaptative-window.vala
@@ -227,9 +227,15 @@ private abstract class AdaptativeWindow : ApplicationWindow
{
if ((event.changed_mask & Gdk.WindowState.MAXIMIZED) != 0)
window_is_maximized = (event.new_window_state & Gdk.WindowState.MAXIMIZED) != 0;
+
/* We don’t save this state, but track it for saving size allocation */
- if ((event.changed_mask & Gdk.WindowState.TILED) != 0)
- window_is_tiled = (event.new_window_state & Gdk.WindowState.TILED) != 0;
+ Gdk.WindowState tiled_state = Gdk.WindowState.TILED
+ | Gdk.WindowState.TOP_TILED
+ | Gdk.WindowState.BOTTOM_TILED
+ | Gdk.WindowState.LEFT_TILED
+ | Gdk.WindowState.RIGHT_TILED;
+ if ((event.changed_mask & tiled_state) != 0)
+ window_is_tiled = (event.new_window_state & tiled_state) != 0;
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]