Re: [PATCH v2] Fix "Back", "Forward", and other special mouse buttons in XWayland.

2014-12-25 Thread Keith Packard
Peter Hutterer  writes:

> On Mon, Dec 22, 2014 at 11:35:29AM -0800, Dima Ryazanov wrote:
>> Currently, the indexes are off by 4 because of the scroll buttons.
>> 
>> Signed-off-by: Dima Ryazanov 
>
> Reviewed-by: Peter Hutterer 

Merged.
   70a6f65..f9e22ce  master -> master

-- 
keith.pack...@intel.com


signature.asc
Description: PGP signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH v2] Fix "Back", "Forward", and other special mouse buttons in XWayland.

2014-12-22 Thread Peter Hutterer
On Mon, Dec 22, 2014 at 11:35:29AM -0800, Dima Ryazanov wrote:
> Currently, the indexes are off by 4 because of the scroll buttons.
> 
> Signed-off-by: Dima Ryazanov 

Reviewed-by: Peter Hutterer 

Cheers,
   Peter
> ---
>  hw/xwayland/xwayland-input.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
> index b8c543c..5e20418 100644
> --- a/hw/xwayland/xwayland-input.c
> +++ b/hw/xwayland/xwayland-input.c
> @@ -233,6 +233,9 @@ pointer_handle_button(void *data, struct wl_pointer 
> *pointer, uint32_t serial,
>  xwl_seat->xwl_screen->serial = serial;
>  
>  switch (button) {
> +case BTN_LEFT:
> +index = 1;
> +break;
>  case BTN_MIDDLE:
>  index = 2;
>  break;
> @@ -240,7 +243,9 @@ pointer_handle_button(void *data, struct wl_pointer 
> *pointer, uint32_t serial,
>  index = 3;
>  break;
>  default:
> -index = button - BTN_LEFT + 1;
> +/* Skip indexes 4-7: they are used for vertical and horizontal 
> scroll.
> +   The rest of the buttons go in order: BTN_SIDE becomes 8, etc. */
> +index = 8 + button - BTN_SIDE;
>  break;
>  }
>  
> -- 
> 2.1.0
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH v2] Fix "Back", "Forward", and other special mouse buttons in XWayland.

2014-12-22 Thread Dima Ryazanov
Currently, the indexes are off by 4 because of the scroll buttons.

Signed-off-by: Dima Ryazanov 
---
 hw/xwayland/xwayland-input.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index b8c543c..5e20418 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -233,6 +233,9 @@ pointer_handle_button(void *data, struct wl_pointer 
*pointer, uint32_t serial,
 xwl_seat->xwl_screen->serial = serial;
 
 switch (button) {
+case BTN_LEFT:
+index = 1;
+break;
 case BTN_MIDDLE:
 index = 2;
 break;
@@ -240,7 +243,9 @@ pointer_handle_button(void *data, struct wl_pointer 
*pointer, uint32_t serial,
 index = 3;
 break;
 default:
-index = button - BTN_LEFT + 1;
+/* Skip indexes 4-7: they are used for vertical and horizontal scroll.
+   The rest of the buttons go in order: BTN_SIDE becomes 8, etc. */
+index = 8 + button - BTN_SIDE;
 break;
 }
 
-- 
2.1.0

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel