input: run mousebind action only on button pressed

This commit is contained in:
Jens Peters 2024-06-11 06:41:24 +02:00 committed by Johan Malm
parent 85a8f3aea3
commit ca317506c0

View file

@ -470,7 +470,7 @@ handle_button(struct wl_listener *listener, void *data)
if (tool && !is_down_mouse_emulation && surface) { if (tool && !is_down_mouse_emulation && surface) {
idle_manager_notify_activity(tool->seat->seat); idle_manager_notify_activity(tool->seat->seat);
if (button) { if (button && ev->state == WLR_BUTTON_PRESSED) {
struct view *view = view_from_wlr_surface(surface); struct view *view = view_from_wlr_surface(surface);
struct mousebind *mousebind; struct mousebind *mousebind;
wl_list_for_each(mousebind, &rc.mousebinds, link) { wl_list_for_each(mousebind, &rc.mousebinds, link) {