Gah, thinko in the previous patch. The attached one should be fine.
--- lock.orig   2006-09-09 10:39:56.000000000 +0200
+++ lock        2006-09-09 10:42:10.000000000 +0200
@@ -46,8 +46,12 @@
     # send the lock command to all sessions
     for session in $avail_sessions; do
        vecho 1 "Locking $session"
-       # dev/null because dcop warns if it can't connect to X (this is normal!)
-       dcop --session "$session" --all-users kdesktop KScreensaverIface lock > 
/dev/null 2>&1
+
+       already_blanked=`dcop --session "$session" --all-users kdesktop 
KScreensaverIface isBlanked`
+       if [ x"$already_blanked" = "xfalse" ] ; then
+               # dev/null because dcop warns if it can't connect to X (this is 
normal!)
+               dcop --session "$session" --all-users kdesktop 
KScreensaverIface lock > /dev/null 2>&1
+       fi
     done
 
     # returning 0 because dcop warns if it can't connect to X (this is normal!)

Attachment: signature.asc
Description: Digital signature



Reply via email to