[MPlayer-dev-eng] screensaver patch

A Mennucc mennucc1 at debian.org
Fri Mar 9 14:37:02 CET 2007


hi

as you all know, gnome-screensaver is not disabled by
-stop-xscreensaver ; this problem was reported
as Debian bug 404975 ; see also
http://bugzilla.gnome.org/show_bug.cgi?id=335149 ; I also posted
http://bugzilla.gnome.org/show_bug.cgi?id=416429 asking for Xss support.

I read the whole "kde screensaver" thread , and I tried a few options,
and I eventually prepared this attached patch (that is for 1.0~rc1 but
should work for latest SVN as well)

this patch is based on Adam  Tlałka idea of moving the mouse

this patch (contrary to the original Adam's patch) does not delete any
of the other methods for disabling screensavers (let it be X or KDE
or...) that are in x11_common.c ; it only adds some more code, so that
the mouse is moved every ~10 sec if the cursor is inside mplayer (or
gmplayer) window and if it is hidden

pros of this patch:

- it is very simple
- it works (in the limit aforementioned) with
  gnome-screensaver (and possibly with any other
  weird screensaver around)
- if playing is paused, gnome-screensaver will
  resume its normal behaviour
- your mouse will not jerk around when you try to click on
 something  :-)

cons:
- since the mouse is only moved when it is inside the mplayer window,
 gnome-screensaver  will not be disabled when the mouse is outside

I tried different similar approaches, and then I decided for this one,
since usually when people watch movies (DVDs, etc) they would use
fullscreen mode and this means (often) that the mouse will be inside the
mplayer window ; whereas  it may be the case that someone is just using
mplayer to just listen to music in videoclips (etc) while doing other
work, and in that case the mouse jerking must absolutely be disabled.

I understand that this is not the perfect solution; it is just a
compromise, to provide a (partial) solution for the gnome-screensaver.

What do you think?

a.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disable-generic-non-Xss-screensaver.diff
Type: text/x-patch
Size: 2219 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070309/6dc52fcd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070309/6dc52fcd/attachment.pgp>


More information about the MPlayer-dev-eng mailing list