[gtk4] Doesn't support multi-button clicks
Enable mouse support and watch mouse events in the gtk4 test app with
printf '\e[?1000h\e[?1006h'; cat
Press and hold button 1. While holding it, press button 3. Release both in some order.
Expected behavior (behavior on gtk3): two press events (ending in M
) and two release events (ending in m
).
Actual behavior: only the first press event, the remaining three are missing. Both buttons remain stuck in pressed state.
You can repeat with 1002
instead of 1000
, to enable mouse movement reporting if a button is pressed. After the experiment, mouse movements are reported until you unstick both button by individually pressing and releasing them.
At this moment I don't know if it's a GTK4 bug, or a slightly changed API that we have to adapt to. Hopefully the latter.
VTE_DEBUG=events
gives a Click gesture stopped
for the second click, and Click gesture unpaired release
for each release.
Maybe we need a mouse_event_from_gesture_release()
counterpart of the already existing mouse_event_from_gesture_click()
, that could take care of the two release events, and find the missing step for the second click.
Or somehow tell GTK not to activate any gesture stuff and always revert to traditional click reporting; although I can see a recent commit deliberately adding "long press touch gesture" support so we probably don't want to do this.