[MPlayer-dev-eng] Fwd: Re: accessibility misfeatures

Alexander Strasser eclipse7 at gmx.net
Mon Jan 10 13:14:49 CET 2005


Diego Biurrun wrote ( On Mon, Jan 10, 2005 at 12:43:43PM +0100 ):
> Arpi writes:
> > > Guys -- it seems that both MPlayer and Xine use the shift key events to keep 
> > > the screen saver from kicking in, though as is mentioned below, pressing the 
> > 
> > WTF?? Is that true?
> 
> Here is the relevant code snippet from libvo/x11_common.c:
> 
> void xscreensaver_heartbeat(void)
> {
>     unsigned int time = GetTimerMS();
>     XEvent ev;
> 
>     if (mDisplay && xs_windowid &&
>         ((time - time_last) > 30000 || (time - time_last) < 0))
>     {
>         time_last = time;
> 
>         ev.xany.type = ClientMessage;
>         ev.xclient.display = mDisplay;
>         ev.xclient.window = xs_windowid;
>         ev.xclient.message_type = screensaver;
>         ev.xclient.format = 32;
>         memset(&ev.xclient.data, 0, sizeof(ev.xclient.data));
>         ev.xclient.data.l[0] = (long) deactivate;
> 
>         mp_msg(MSGT_VO, MSGL_DBG2, "Pinging xscreensaver.\n");
>         XSendEvent(mDisplay, xs_windowid, False, 0L, &ev);
>         XSync(mDisplay, False);
>     }
> }
> 
> I may be wrong, but I do not see a shift key in there.

I think you are right!
This code sends an event of type SCREENSAVER with the content DEACTIVATE.
This should be equal to fire up a xscreensaver-command -deactivate. And
this pretends a user interaction meaning
- if the screen was blanked => unblank it
- if the screen wasn't blanked => reset the timeout.

So either these accusations are wrong or there is more xscreensaver code
in mplayer we don't know of. But i really don't think so.

  Alex (beastd)




More information about the MPlayer-dev-eng mailing list