[PATCH weston] Fix "Back", "Forward", and other special mouse buttons in the X11 compositor.

Dima Ryazanov dima at gmail.com
Sun Jan 11 17:08:08 PST 2015


Looks like this patch got discarded (according to patchwork)?

This one is different from http://patchwork.freedesktop.org/patch/39499/.
That one fixed the Wayland->X11 key code translation; this one fixes
X11->Wayland.
On Dec 22, 2014 11:51 AM, "Dima Ryazanov" <dima at gmail.com> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150111/eea742a5/attachment.html>


More information about the wayland-devel mailing list