[MPlayer-dev-eng] [RFC] kde screensaver stuff using system()

Adam Tlałka atlka at pg.gda.pl
Thu Feb 8 23:08:56 CET 2007


Dnia Thu, 8 Feb 2007 22:36:39 +0200
"Ivan Kalvachev" <ikalvachev at gmail.com> napisał(a):

> 2007/2/8, Adam Tlałka <atlka at pg.gda.pl>:
> > Dnia Wed, 7 Feb 2007 18:42:04 +0100
> > Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>
> > napisał(a):
> >
> > > Where is there a patch?
> >
> > Look at
> > http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2006-April/042520.html
> >
> > IMHO the proper way is to use some Xserver or X11 extension to
> > signal that an app doesn't want screensaver or DPMS activation.
> > Xserver should notice these requests and properly cooperate with
> > registered xscreensaver program. Mentioned patch uses DBUS and is
> > gnome specific.
> >
> > So mouse movements hack can work at once and forcing X-org people to
> > implement properly working extension and of course Gnome and KDE
> > people to use it is the future.
> 
> Read this thread again. Xorg have such extensions. It is KDE&Gnome
> people fault that they ignore it. (however latest kde releases may
> honor it). It's called Xss (X ScreenSaver).

Right - this is the proper way.

> 
> Anyway, I wonder if your approach would work if motion is always
> (0,0). The chance that screensavers check for motion events and not
> motion itself. Anyway, it needs testing.

I move the mouse pointer 16 pixels right then 16 pixels
left relatively to current position.
fake_move_distance = 16 and then it is negated after each move 

> 
> Just looked at the patch. Please let us remove the old screensaver
> code. Your approach must be tested (in release) before we remove all
> the other. And should not be enabled by default.
> DMPS and XGet/SetScreenSaver are "official" X extensions, so they
> should not be removed.

I've tested DPMS, xscreensaver and gnome-screensaver. It works for me.
KDE ??
There is no need to do anything with DPMS because if mplayer crash the
settings will stay because these are global Xserver settings.

Talking about XGet/SetScreensaver the last sets global state too.
So it is not the best solution. I think that invoking periodically
XResetScreenSaver(mDisplay) in xscreensaver_heartbeat() should do the
trick. Of course only if all screensaver programs properly cooperate
with Xserver.

Regards
-- 
Adam Tlałka       mailto:atlka at pg.gda.pl    ^v^ ^v^ ^v^



More information about the MPlayer-dev-eng mailing list