diff --git a/scripts/xdg-screensaver.in b/scripts/xdg-screensaver.in index 579b80e..84369cb 100644 --- a/scripts/xdg-screensaver.in +++ b/scripts/xdg-screensaver.in @@ -216,6 +216,13 @@ track_window() echo "$window_id:$xprop_pid" >> $tmpfile $MV "$tmpfile" "$screensaver_file" unlockfile + # in KDE4, simulating user activity prevents the screensaver autolock + if [ "$DE" = "kde" -a x"$KDE_SESSION_VERSION" = x"4" ]; then + while kill -0 $xprop_pid; do + qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity > /dev/null + sleep 5 + done + fi # Wait for xprop to edit, it means that the window disappeared wait $xprop_pid # Clean up the administration and resume the screensaver