[PATCH weston] Fix "Back", "Forward", and other special mouse buttons in the X11 compositor.
Peter Hutterer
peter.hutterer at who-t.net
Tue Feb 3 14:36:53 PST 2015
On Mon, Dec 22, 2014 at 11:51:05AM -0800, Dima Ryazanov wrote:
> They're off by 4 because of the scroll buttons.
>
> (However, if you test them in XWayland, they'll appear to work because
> XWayland has the same bug; see
> http://lists.x.org/archives/xorg-devel/2014-December/044987.html)
>
> Signed-off-by: Dima Ryazanov <dima at gmail.com>
> ---
> src/compositor-x11.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/compositor-x11.c b/src/compositor-x11.c
> index 29f2119..af9de6f 100644
> --- a/src/compositor-x11.c
> +++ b/src/compositor-x11.c
> @@ -1015,7 +1015,10 @@ x11_compositor_deliver_button_event(struct x11_compositor *c,
>
> switch (button_event->detail) {
> default:
> - button = button_event->detail + BTN_LEFT - 1;
> + button = button_event->detail + BTN_SIDE - 8;
> + break;
> + case 1:
> + button = BTN_LEFT;
> break;
> case 2:
> button = BTN_MIDDLE;
> --
> 2.1.0
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
though I'd prefer having the default at the bottom of the switch
case
Cheers,
Peter
More information about the wayland-devel
mailing list