[mutter] window: Handle TOUCH_BEGIN events separately during grab ops
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Handle TOUCH_BEGIN events separately during grab ops
- Date: Thu, 4 Mar 2021 23:07:19 +0000 (UTC)
commit ef1b1018210a10a54d55ca0415e18461743a4dc0
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu Mar 14 10:49:19 2019 +0100
window: Handle TOUCH_BEGIN events separately during grab ops
Handle the case of a TOUCH_BEGIN event during window dragging separately
instead of treating it like a TOUCH_UPDATE event: Simply return TRUE to
make Clutter stop event propagation if it's the pointer emulating
sequence and let Clutter propagate the event if it isn't.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/427>
src/core/window.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index b68dcb2b69..47fff926e8 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6497,6 +6497,12 @@ meta_window_handle_mouse_grab_op_event (MetaWindow *window,
switch (event->type)
{
+ case CLUTTER_TOUCH_BEGIN:
+ if (!meta_display_is_pointer_emulating_sequence (window->display, sequence))
+ return FALSE;
+
+ return TRUE;
+
case CLUTTER_BUTTON_PRESS:
{
ClutterModifierType grab_mods = meta_display_get_compositor_modifiers (window->display);
@@ -6529,12 +6535,6 @@ meta_window_handle_mouse_grab_op_event (MetaWindow *window,
return TRUE;
- case CLUTTER_TOUCH_BEGIN:
- /* This will only catch the keybinding and menu cases, just deal with this
- * like a CLUTTER_TOUCH_UPDATE rather than a CLUTTER_BUTTON_PRESS, and
- * wait until CLUTTER_TOUCH_END to undo the grab, just so the window
- * doesn't warp below the finger and remain there.
- */
case CLUTTER_TOUCH_UPDATE:
if (!meta_display_is_pointer_emulating_sequence (window->display, sequence))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]