[MPlayer-dev-eng] [PATCH] GUI cursor control

Alexander Strasser eclipse7 at gmx.net
Sun Sep 4 17:02:25 CEST 2011


Hi

Reimar Döffinger wrote:
> On Sat, Sep 03, 2011 at 01:58:43AM +0200, Ingo Brückl wrote:
> > To give the GUI control over the cursor (i.e. to avoid uncontrolled
> > appearances) I'd like to patch vo_x11_uninit().
> > 
> > The control could be achieved by either not showing the cursor if there
> > is a WinID (#1) or by a direct dependency on the GUI itself (#2).
> > 
> > #1 is more general and would pass control (and duty) to show the cursor to
> > the application owning WinID (which sounds reasonable at first), while #2
> > is the safest way, but maybe uglier.
> > 
> > Is one of them acceptable?
> > 
> > Ingo
> 
> > Index: libvo/x11_common.c
> > ===================================================================
> > --- libvo/x11_common.c	(revision 34051)
> > +++ libvo/x11_common.c	(working copy)
> > @@ -752,7 +752,7 @@
> >  void vo_x11_uninit(void)
> >  {
> >      saver_on(mDisplay);
> > -    if (vo_window != None)
> > +    if (vo_window != None && vo_window != WinID)
> 
> I think that should be WinID > 0 or >= 0 to be consistent with the other
> code.
> I think that should be a good idea, however vo_hidecursor should then
> also not be called by default, only disabling the showcursor but not
> hidecursor seems like a really bad idea.

  I agree that this is a good idea and that hidecursor should be
disabled too. Maybe it is a more viable approach to disable them
from inside the vo_showcursor/vo_hidecursor routines themselves
and document them while at it.

  Also I could not find any of these called outside the x11_common
object module, so it may be a good idea to remove the prototypes
and make them private to x11_common.c by marking them static.

  Alexander


More information about the MPlayer-dev-eng mailing list