diff options
-rw-r--r-- | core/src/widget/window.vala | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/core/src/widget/window.vala b/core/src/widget/window.vala index 15c666c..f1a377f 100644 --- a/core/src/widget/window.vala +++ b/core/src/widget/window.vala @@ -52,26 +52,26 @@ public class Window : Gtk.Window { } public bool inhibit { - set { - if(inhibit_manager == null) { - return; - } - if(value && inhibitor == null) { - inhibitor = inhibit_manager.inhibit(this); + set { + if (inhibit_manager == null) { + return; + } + if (value && inhibitor == null) { + inhibitor = inhibit_manager.inhibit(this); + } + else if (!value && inhibitor != null) { + inhibitor = null; + } } - else if(!value && inhibitor != null){ - inhibitor = null; + get { + return inhibitor != null; } - } - get { - return inhibitor != null; - } } public override void show() { base.show(); if(inhibit) { - inhibitor = inhibit_manager.inhibit(this); + inhibitor = inhibit_manager.inhibit(this); } } |