[Portland-bugs] [Bug 26085] New: xdg-screensaver resume activates the screensaver on KDE4

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jan 17 12:45:00 PST 2010


http://bugs.freedesktop.org/show_bug.cgi?id=26085

           Summary: xdg-screensaver resume activates the screensaver on KDE4
           Product: Portland
           Version: 1.0
          Platform: All
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: xdg-utils
        AssignedTo: portland-bugs at lists.freedesktop.org
        ReportedBy: jpeg at videolan.org


Hi,

Under KDE4, instead of calling the DBUS method UnInhibit, the script
xdg-screensaver calls the method SetActive. This starts the screensaver
immediately, and this is absolutely not the expected behaviour.

The function screensaver_freedesktop() in the script is broken (and there are
some FIXME's around). Here's a diff of what it should look like:


diff --git a/usr/bin/xdg-screensaver b/xdg-screensaver
index 29e8e18..015cc2e 100755
--- a/usr/bin/xdg-screensaver
+++ b/xdg-screensaver
@@ -558,13 +558,13 @@ screensaver_freedesktop()
 {
     case "$1" in
         suspend)
-        #FIXME (get/store cookie)
-        qdbus org.freedesktop.ScreenSaver /ScreenSaver
org.freedesktop.ScreenSaver.Inhibit $window_id xdg-screensaver  > /dev/null
+        qdbus org.freedesktop.ScreenSaver /ScreenSaver
org.freedesktop.ScreenSaver.Inhibit $window_id xdg-screensaver >|
"$screensaver_file.cookie" 2> /dev/null
         result=$?
         ;;

         resume)
-        qdbus org.freedesktop.ScreenSaver /ScreenSaver
org.freedesktop.ScreenSaver.SetActive true > /dev/null
+        qdbus org.freedesktop.ScreenSaver /ScreenSaver
org.freedesktop.ScreenSaver.UnInhibit `cat "$screensaver_file.cookie"` >
/dev/null
+        rm -f "$screensaver_file.cookie"
         result=$?
         ;;

@@ -578,8 +578,8 @@ screensaver_freedesktop()
         ;;

         reset)
-        #FIXME (cookies?)
-        qdbus org.freedesktop.ScreenSaver /ScreenSaver
org.freedesktop.ScreenSaver.UnInhibit $window_id > /dev/null
+        qdbus org.freedesktop.ScreenSaver /ScreenSaver
org.freedesktop.ScreenSaver.UnInhibit `cat "$screensaver_file.cookie"` >
/dev/null
+        rm -f "$screensaver_file.cookie"
         result=$?
         ;;

Best regards,


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Portland-bugs mailing list