MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / onMouseButtonUp

Function onMouseButtonUp

source/kernel/devs/devinput.cpp:710–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

708}
709
710void onMouseButtonUp(U32 button) {
711 if (!touchEvents) {
712 return;
713 }
714 U64 time = KSystem::getSystemTimeAsMicroSeconds();
715 BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(touchEvents->bufferCond);
716
717 if (button == 0)
718 queueEvent(touchEvents, K_EV_KEY, K_BTN_LEFT, 0, time);
719 else if (button == 2)
720 queueEvent(touchEvents, K_EV_KEY, K_BTN_MIDDLE, 0, time);
721 else if (button == 1)
722 queueEvent(touchEvents, K_EV_KEY, K_BTN_RIGHT, 0, time);
723 else
724 return;
725 postSendEvent(touchEvents, time);
726 BOXEDWINE_CONDITION_SIGNAL_ALL(touchEvents->bufferCond);
727}
728
729void onMouseButtonDown(U32 button) {
730 if (!touchEvents) {

Callers 1

handlSdlEventMethod · 0.85

Calls 2

queueEventFunction · 0.85
postSendEventFunction · 0.85

Tested by

no test coverage detected