summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd
diff options
context:
space:
mode:
authorRiteo <riteo@posteo.net>2024-09-10 20:48:52 +0200
committerRiteo <riteo@posteo.net>2024-09-10 20:53:53 +0200
commit343ea9c6f79b5d3087cbe5558e1de30c3858778e (patch)
tree237e6121392fb115c4e47d22fdeae7019c47613e /platform/linuxbsd
parent97ef3c837263099faf02d8ebafd6c77c94d2aaba (diff)
downloadredot-engine-343ea9c6f79b5d3087cbe5558e1de30c3858778e.tar.gz
Wayland: clear button mask on pointer leave
While experimenting with the recent "extent to title" PR, I noticed that it's not guaranteed for a "button released" event to be emitted when the pointer leaves the main surface, leaving some buttons stuck. Not doing this for tablets since the spec makes this behavior clear and explicit, so we (hopefully) shouldn't have this issue there.
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r--platform/linuxbsd/wayland/wayland_thread.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/linuxbsd/wayland/wayland_thread.cpp b/platform/linuxbsd/wayland/wayland_thread.cpp
index 66be313ff6..08b20c5b42 100644
--- a/platform/linuxbsd/wayland/wayland_thread.cpp
+++ b/platform/linuxbsd/wayland/wayland_thread.cpp
@@ -1395,6 +1395,8 @@ void WaylandThread::_wl_pointer_on_leave(void *data, struct wl_pointer *wl_point
ss->pointed_surface = nullptr;
+ ss->pointer_data_buffer.pressed_button_mask.clear();
+
Ref<WindowEventMessage> msg;
msg.instantiate();
msg->event = DisplayServer::WINDOW_EVENT_MOUSE_EXIT;