qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] ps2: add support for mice with extra/side butto


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] ps2: add support for mice with extra/side buttons
Date: Tue, 29 Nov 2016 08:51:52 +0100

  Hi,

> +    /* the definition of MOUSE_EVENT_WHEELUP/MOUSE_EVENT_WHEELDN
> +     * is ambiguous since ps2_mouse_send_packet expects the bits
> +     * for buttons 4 and 5 at s->mouse_buttons & 0x18 which
> +     * matches MOUSE_EVENT_WHEELUP/MOUSE_EVENT_WHEELDN */
>       static const int bmap[INPUT_BUTTON__MAX] = {
>           [INPUT_BUTTON_LEFT]   = MOUSE_EVENT_LBUTTON,
>           [INPUT_BUTTON_MIDDLE] = MOUSE_EVENT_MBUTTON,
>           [INPUT_BUTTON_RIGHT]  = MOUSE_EVENT_RBUTTON,
> +        [INPUT_BUTTON_SIDE]   = MOUSE_EVENT_WHEELUP,
> +        [INPUT_BUTTON_EXTRA]  = MOUSE_EVENT_WHEELDN,

Please create new #defines for all the ps2 mouse buttons (locally in
ps2.c), that'll be less confusing.

The MOUSE_EVENT_*BUTTON #defines happen to match the ps2 protocol, for
historic reasons.  But they should not be used that way any more.  The
WHEEL defines are not used at all in the code base.  I'll go send a
patch to drop them.

Oh, and please split this patch into multiple smaller ones.  I'd suggest
one json, one for ui/* and one for ps2.

> @@ -4280,7 +4280,7 @@
>   # Since: 2.0
>   ##
>   { 'enum'  : 'InputButton',
> -  'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
> +  'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 
> 'side', 'extra' ] }

Patch looks mangled.  Happens often when you cut+paste patches into a
graphical or web client.  Try "git send-email" instead.

cheers,
  Gerd




reply via email to

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