[MPlayer-dev-eng] screensaver patch
Ivan Kalvachev
ikalvachev at gmail.com
Tue Mar 13 16:41:59 CET 2007
2007/3/9, A Mennucc <mennucc1 at debian.org>:
> 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.
I like your patch.
I haven't tested it yet, but by first look at the source looks simple enough.
However I'd request 2 modifications.
1. I see that you use variable "mouse_ignore_motion". You set it
before moving the cursor and clear it in the event loop. However I'd
like if you ignore motion only if it is not-bigger than the
fake_move_distance
2. I'd like this behavior conditioned under global option. Se we can
write in the home page, "if you have problem use the
'-hack-my-buggy-screensaver-that-does-not-support-Xss'"
;)
BTW,
I'd like clear copyright message for the commit. something like
"patch by A Mennucc <mennucc1 at debian.org> based on patch by Adam
Tlałka <atlka at pg.gda.pl>"
More information about the MPlayer-dev-eng
mailing list