Skip to content

Commit 4a3cf11

Browse files
committed
button_action 2
1 parent aa19fb3 commit 4a3cf11

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/ruisapp/glue/linux/xorg/glue.cxx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ int main(int argc, const char** argv)
440440
ruis::key key = key_code_map[std::uint8_t(event.xkey.keycode)];
441441

442442
w.gui.send_key(
443-
true, //
443+
ruis::button_action::press, //
444444
key
445445
);
446446

@@ -489,23 +489,26 @@ int main(int argc, const char** argv)
489489
}
490490
}
491491

492-
w.gui.send_key(false, key);
492+
w.gui.send_key(
493+
ruis::button_action::release, //
494+
key
495+
);
493496
}
494497
break;
495498
case ButtonPress:
496499
w.gui.send_mouse_button(
497-
true, //
500+
ruis::button_action::press, //
498501
ruis::vec2(event.xbutton.x, event.xbutton.y),
499502
button_number_to_enum(event.xbutton.button),
500-
0
503+
0 // pointer_id
501504
);
502505
break;
503506
case ButtonRelease:
504507
w.gui.send_mouse_button(
505-
false, //
508+
ruis::button_action::release, //
506509
ruis::vec2(event.xbutton.x, event.xbutton.y),
507510
button_number_to_enum(event.xbutton.button),
508-
0
511+
0 // pointer_id
509512
);
510513
break;
511514
case MotionNotify:
@@ -514,19 +517,19 @@ int main(int argc, const char** argv)
514517
event.xmotion.x, //
515518
event.xmotion.y
516519
), //
517-
0
520+
0 // pointer_id
518521
);
519522
break;
520523
case EnterNotify:
521524
w.gui.send_mouse_hover(
522525
true, //
523-
0
526+
0 // pointer_id
524527
);
525528
break;
526529
case LeaveNotify:
527530
w.gui.send_mouse_hover(
528531
false, //
529-
0
532+
0 // pointer_id
530533
);
531534
break;
532535
case ClientMessage:

0 commit comments

Comments
 (0)