mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
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>
This commit is contained in:
parent
9889e6dadd
commit
ef1b101821
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user