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

Adam Tlałka atlka at pg.gda.pl
Wed Feb 7 10:24:46 CET 2007


Dnia Wed, 7 Feb 2007 14:16:36 +0800
"Zuxy Meng" <zuxy.meng at gmail.com> napisał(a):

> Hi,
> 
> 2007/2/7, Diego Biurrun <diego at biurrun.de>:
> > On Mon, Feb 05, 2007 at 03:53:10PM +0100, Reimar Döffinger wrote:
> > > I do feel a bit uncomfortable about this, it seems extremely like
> > > a hack to me.
> > > Is there no better way?
> > > Do we really have to handle this screensaver mess?
> > > Any other comments?
> >
> > We were talking about this on IRC the other day.  A problem that we
> > currently have is that gnome screensaver is not stopped, which is an
> > annoyance for users.  An annoyance that distros have started working
> > around in multiple different and mostly hackish ways.
> >
> > A way out of this dilemma might be generating keypress events at
> > regular intervals.  It promises to work across all platforms and
> > not need to be extended for the screensaver du jour ..
> 
> Ever since Win98 Windows provides an API called
> SetThreadExecutionState() that can be used as a heartbeat function to
> prohibit screensavers. Anything similar in X Windows?
 
Why in X Windows? It should be more generic app state.
With text console or vidix or just pure X11 we want to disable DPMS
too for example. There is no screensaver process at all in this
situaction. So changeing X-protocol or adding new states to EWMH hints
is only a partial solution.

Why not do it just the Unix way - open one special file if we want
disable screensavers.
If the file has non zero usage just abort screensaver, DPMS etc.
Simple and doesn't need any special protocol, window state
querrying, X11 protocol etc. Even shell script can use it.
Of course it needs changes to implement this solution and it is not
usable on different proprietary systems.
It has problems with remote displays too.

So because of all these faked keypress/release or mouse movements seems
to be more compatible solution then any proposed one.

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



More information about the MPlayer-dev-eng mailing list