From 783846adc983d72a52c43e802f6491d7815a0347 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sat, 13 Apr 2019 13:25:26 -0400 Subject: [PATCH] Fixed #3 mouse is_drag error on x11 --- hook/x11/hook_c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hook/x11/hook_c.h b/hook/x11/hook_c.h index 4733051..cc9c5e6 100644 --- a/hook/x11/hook_c.h +++ b/hook/x11/hook_c.h @@ -746,7 +746,7 @@ void hook_event_proc(XPointer closeure, XRecordInterceptData *recorded_data) { // Check the upper half of virtual modifiers for non-zero // values and set the mouse dragged flag. - hook->input.mouse.is_dragged = (event.mask >> 8 > 0); + hook->input.mouse.is_dragged = ((event.mask & 0x1F00) > 0); if (hook->input.mouse.is_dragged) { // Create Mouse Dragged event. event.type = EVENT_MOUSE_DRAGGED;