[PATCH xwayland 1/2] xwayland: Correct off-by-one error in tablet button numbering
Peter Hutterer
peter.hutterer at who-t.net
Mon Jun 12 01:47:41 UTC 2017
On Fri, Jun 09, 2017 at 04:02:06PM -0700, Jason Gerecke wrote:
> The 'tablet_tool_frame' function treats the button masks as though they
> are zero-indexed, but 'tablet_tool_function_state' treats them as one-
I'm assuming this was supposed to be tablet_tool_button_state? If so, pushed
with that fixed in the commit message. If not, then oops :)
d5e2f271a..7c7a540f1 master -> master
Thanks
Cheers,
Peter
> indexed. The result is that an e.g. middle click event recieved from
> Wayland will be sent from the X server as a right-click instead.
>
> Fixes: 773b04748d0 ("xwayland: handle button events after motion events")
> Signed-off-by: Jason Gerecke <jason.gerecke at wacom.com>
> ---
> hw/xwayland/xwayland-input.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
> index 557aac8ed..c2801fa70 100644
> --- a/hw/xwayland/xwayland-input.c
> +++ b/hw/xwayland/xwayland-input.c
> @@ -1620,9 +1620,9 @@ tablet_tool_button_state(void *data, struct zwp_tablet_tool_v2 *tool,
> BUG_RETURN(xbtn >= 8 * sizeof(*mask));
>
> if (state)
> - SetBit(mask, xbtn);
> + SetBit(mask, xbtn - 1);
> else
> - ClearBit(mask, xbtn);
> + ClearBit(mask, xbtn - 1);
>
> xwl_seat->xwl_screen->serial = serial;
> }
> --
> 2.13.0
>
More information about the xorg-devel
mailing list