[mutter] wayland: Update button state on motion/button events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Update button state on motion/button events
- Date: Mon, 24 Jul 2017 15:59:53 +0000 (UTC)
commit 5db48faca408582706fbe07b570f64a879a515a7
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jul 24 17:29:37 2017 +0200
wayland: Update button state on motion/button events
More specifically, avoid crossing events, since clutter does not set
modifier/button state on those. Fixes implicit grabs being broken when
the pointer moves past the surface boundaries.
https://bugzilla.gnome.org/show_bug.cgi?id=785347
src/wayland/meta-wayland-pointer.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 15e27cd..d5c90c1 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -606,7 +606,12 @@ meta_wayland_pointer_update (MetaWaylandPointer *pointer,
{
repick_for_event (pointer, event);
- pointer->button_count = count_buttons (event);
+ if (event->type == CLUTTER_MOTION ||
+ event->type == CLUTTER_BUTTON_PRESS ||
+ event->type == CLUTTER_BUTTON_RELEASE)
+ {
+ pointer->button_count = count_buttons (event);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]