summaryrefslogtreecommitdiff
path: root/src/simple-scan.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/simple-scan.vala')
-rw-r--r--src/simple-scan.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/simple-scan.vala b/src/simple-scan.vala
index 3f495e5..c15a541 100644
--- a/src/simple-scan.vala
+++ b/src/simple-scan.vala
@@ -50,6 +50,8 @@ public class SimpleScan : Gtk.Application
{
base.startup ();
+ Hdy.init ();
+
app = new AppWindow ();
book = app.book;
app.start_scan.connect (scan_cb);
@@ -1773,7 +1775,7 @@ public class SimpleScan : Gtk.Application
* but will not work on KDE, LXDE, XFCE, ... */
inhibit_cookie = inhibit (app, Gtk.ApplicationInhibitFlags.IDLE, reason);
- if (!is_inhibited (Gtk.ApplicationInhibitFlags.IDLE))
+ if (inhibit_cookie == 0)
{
/* If the previous method didn't work, try the one
* provided by Freedesktop. It should work with KDE,