qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] gtk: Keep the pointer within window during inpu


From: Takashi Iwai
Subject: Re: [Qemu-devel] [PATCH] gtk: Keep the pointer within window during input grab
Date: Fri, 11 Apr 2014 15:28:49 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Fri, 11 Apr 2014 15:07:34 +0200,
Gerd Hoffmann wrote:
 
> On Di, 2014-04-08 at 14:46 +0200, Takashi Iwai wrote:
> > The current code shows annoying behavior where the X pointer can move
> > out of the window during the input grab in the absolute mode.  Due to
> > this, the pointer in qemu window looks as if frozen until the real
> > (invisible) X pointer comes back to the window again.
> > 
> > For avoiding such an unexpected lag, this patch limits the pointer
> > movement only within the qemu window during the input grab in the
> > absolute mode.  When the pointer goes out, it's moved back to the
> > boundary again.
> 
> At least at X11 level it is possible to simply confine the pointer to a
> certain window (see "man XGrabPointer").  Then you don't have to warp
> the pointer.

I have such a vague memory, too, and tried it before my patch, but
couldn't manage to make it working.  The man page describes the
pointer event processing, but it doesn't describe how the pointer
moves.  It's more than a decade when I played with it, so I really
forget how these things work...

>  Warping the pointer in absolute mode has ugly effects (see
> 2bda66028b4962c36d4eabe2995edab12df93691).

What exact effect do we see?  The commit log doesn't give much clue,
and I didn't notice any issue with gtk and qxl, so far.

> Other possible solution: Never ever grab the pointer in absolute mode.

It's sometimes more practical to have a grab mode even in the absolute
mode.  It's a minor requirement, I agree, though.


Takashi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]