mirror of
https://github.com/robotn/gohook.git
synced 2024-11-21 18:36:51 +08:00
Fixed #3 mouse is_drag error on x11
This commit is contained in:
parent
a7a3894671
commit
783846adc9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user