From 719525a4a1f5fa25bea3432a1c33bb30f586848d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 23 Nov 2021 23:21:43 +0900 Subject: [PATCH] [x11] Set backed mouse button state for raw presses Fixes button press events being treated as button releases in the event handlers. --- libs/video/targets/in_x11.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/video/targets/in_x11.c b/libs/video/targets/in_x11.c index d4b7c1090..659ea1bb0 100644 --- a/libs/video/targets/in_x11.c +++ b/libs/video/targets/in_x11.c @@ -968,6 +968,7 @@ xi_raw_button (void *event, int press) } else { x11_mouse.buttons &= ~(1 << button); } + x11_mouse_buttons[button].state = press; if (!in_x11_send_mouse_event (press ? ie_mousedown : ie_mouseup)) { in_x11_send_button_event (x11_mouse_device.devid, &x11_mouse_buttons[button],