[MPlayer-dev-eng] [PATCH] [trivial] xautolock based screensaver enable\disable by -stop-xscreensaver
Attila Kinali
attila at kinali.ch
Sat Sep 11 15:28:20 CEST 2004
On Mon, Aug 23, 2004 at 06:11:06PM +0400, Konstantin G. Khlebnikov wrote:
>
> diff -urN cvs/libvo/x11_common.c my/libvo/x11_common.c
> --- cvs/libvo/x11_common.c 2004-08-23 17:32:10.000000000 +0400
> +++ my/libvo/x11_common.c 2004-08-23 17:45:19.000000000 +0400
> @@ -1659,8 +1659,10 @@
> ("dcop kdesktop KScreensaverIface enable true 2>/dev/null >/dev/null");
> kdescreensaver_was_running = 0;
> }
> -
> -
> +
> + if (stop_xscreensaver)
> + if (! system("xautolock -enable >/dev/null 2>/dev/null"))
> + mp_msg(MSGT_VO, MSGL_INFO, "xautolock enabled\n");
> }
>
> void saver_off(Display * mDisplay)
> @@ -1709,6 +1711,10 @@
> system
> ("dcop kdesktop KScreensaverIface enable false 2>/dev/null >/dev/null");
> }
> +
> + if (stop_xscreensaver)
> + if (! system("xautolock -disable >/dev/null 2>/dev/null"))
> + mp_msg(MSGT_VO, MSGL_INFO, "xautolock disabled\n");
Is it possible to detect whether xautolock is running or not similar to
the kde screensaver? If it is it should be done, if not, xautoloc should
only be enabled if a commandline/config parameter is passed, otherwise
we end up enabling something that wasnt running at all.
Attila Kinali
More information about the MPlayer-dev-eng
mailing list