Created attachment 142613 [details] [review]
Patch to support xss-lock in xdg-screensaver.
The attached patch adds support for xss-lock to xdg-screensaver.
xss-lock runs a user specified locker in response to X server screen saver events (also some systemd events).
xss-lock would otherwise work fine with the 'screensaver_xserver' code in current xdg-screensaver, but there is no support for the 'lock' subcommand in screensaver_xserver, so some power managers (at least xfce4-power-manager) fail to lock the screen when suspending. Also, the desktop environment detection code could cause xdg-screensaver to use a code path for some other screen saver than screensaver_xserver, while xss-lock is running.
This patch detects a running xss-lock program and runs the appropriate actions, that is, it runs screensaver_xserver and replaces the 'lock' subcommand with 'activate'.
Thanks for the patch, I'll try to review it when I'm able.