[PATCH] mi: fix cursor warping screens

Peter Hutterer peter.hutterer at who-t.net
Sun Aug 2 16:23:09 PDT 2009


On Sun, Aug 02, 2009 at 09:47:40PM +0300, Tiago Vignatti wrote:
> The server was processing ET_RawMotion type when the cursor was wrapping to
> another screen and getting wrong valuator values. This fix such issue
> considering only ET_Motion types when the cursor detects a new screen.
> 
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> ---
> Dave: I'd appreciate your review as well given that, besides me, you're 
> probably the only one playing with multiscreen on upstream :)
> 
>  mi/mieq.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/mi/mieq.c b/mi/mieq.c
> index 6ec2dba..3ee7e2e 100644
> --- a/mi/mieq.c
> +++ b/mi/mieq.c
> @@ -367,7 +367,8 @@ mieqProcessDeviceEvent(DeviceIntPtr dev,
>      /* Custom event handler */
>      handler = miEventQueue.handlers[event->any.type];
>  
> -    if (dev && screen && screen != DequeueScreen(dev) && !handler) {
> +    if (event->any.type == ET_Motion && dev && screen &&
> +        screen != DequeueScreen(dev) && !handler) {
>          /* Assumption - screen switching can only occur on motion events. */
>          DequeueScreen(dev) = screen;
>          x = event->device.root_x;
> -- 
> 1.5.6.3

With the recent (and future) patches to evdev by Oliver we may get screen
switching for button and key events too. The check should go for KeyPress,
KeyRelease, ButtonPress, ButtonRelease and Motion.

Other than that, looks good.

Cheers,
  Peter


More information about the xorg-devel mailing list