diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2018-02-24 17:21:03 +0100 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2018-02-24 17:21:03 +0100 |
commit | 3b8a1431d2ce24950b8be6d2b5b5514ab29c9577 (patch) | |
tree | 6ee82ffe528a78cbca6f852fc5f5d5ad1c909343 | |
parent | fc3bc381081d6b5cde082551dbb8e50946ac6e65 (diff) | |
download | gnome-contacts-3b8a1431d2ce24950b8be6d2b5b5514ab29c9577.tar.gz |
Window: use flag operations in window_state_event()
-rw-r--r-- | src/contacts-window.vala | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/contacts-window.vala b/src/contacts-window.vala index 1f493df..a626a07 100644 --- a/src/contacts-window.vala +++ b/src/contacts-window.vala @@ -112,13 +112,10 @@ public class Contacts.Window : Gtk.ApplicationWindow { } public override bool window_state_event (Gdk.EventWindowState event) { - if ((event.new_window_state & Gdk.WindowState.WITHDRAWN) == 0) { - bool maximized = ( - (event.new_window_state & Gdk.WindowState.MAXIMIZED) != 0 - ); - if (this.window_maximized != maximized) { + if (!(Gdk.WindowState.WITHDRAWN in event.new_window_state)) { + bool maximized = (Gdk.WindowState.MAXIMIZED in event.new_window_state); + if (this.window_maximized != maximized) this.window_maximized = maximized; - } } return base.window_state_event (event); } |