Hi,

On 01-12-15 23:52, Peter Hutterer wrote:
These aren't real button events and they are handled elsewhere, either through
proper touch events on touchscreen or through custom handling in the touchpad
case.

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>

Looks good:

Reviewed-by: Hans de Goede <hdego...@redhat.com>

Regards,

Hans


---
  src/evdev.c | 16 +++++++++++++++-
  1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/evdev.c b/src/evdev.c
index ec3abc6..4933185 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -439,8 +439,22 @@ evdev_flush_pending_event(struct evdev_device *device, 
uint64_t time)
  static enum evdev_key_type
  get_key_type(uint16_t code)
  {
-       if (code == BTN_TOUCH)
+       switch (code) {
+       case BTN_TOOL_PEN:
+       case BTN_TOOL_RUBBER:
+       case BTN_TOOL_BRUSH:
+       case BTN_TOOL_PENCIL:
+       case BTN_TOOL_AIRBRUSH:
+       case BTN_TOOL_MOUSE:
+       case BTN_TOOL_LENS:
+       case BTN_TOOL_QUINTTAP:
+       case BTN_TOOL_DOUBLETAP:
+       case BTN_TOOL_TRIPLETAP:
+       case BTN_TOOL_QUADTAP:
+       case BTN_TOOL_FINGER:
+       case BTN_TOUCH:
                return EVDEV_KEY_TYPE_NONE;
+       }

        if (code >= KEY_ESC && code <= KEY_MICMUTE)
                return EVDEV_KEY_TYPE_KEY;

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

Reply via email to