[simple-scan/gnome-3-38] Do not use is_inhibited() as it is not reliable, check the cookie value instead.



commit 17278540c86d36042457c39ce45cb7b5ab572b9b
Author: pozsgay <mate pozsgay ext nsn com>
Date:   Sun Oct 25 13:54:02 2020 +0000

    Do not use is_inhibited() as it is not reliable, check the cookie value instead.
    
    
    (cherry picked from commit edf87d66024d580ca372b3d5782fbdef4ce2cc48)

 src/simple-scan.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/simple-scan.vala b/src/simple-scan.vala
index 3f495e56..84d8a8c1 100644
--- a/src/simple-scan.vala
+++ b/src/simple-scan.vala
@@ -1773,7 +1773,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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]