mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-11 06:43:56 +00:00
[client] x11: call app_handleWheelMotion for imgui scroll interaction
This commit is contained in:
parent
8898496eba
commit
3143dc1e84
1 changed files with 8 additions and 1 deletions
|
@ -810,7 +810,14 @@ static void x11GenericEvent(XGenericEventCookie *cookie)
|
|||
return;
|
||||
|
||||
XIDeviceEvent *device = cookie->data;
|
||||
app_handleButtonPress(device->detail);
|
||||
if (device->detail == 4)
|
||||
app_handleWheelMotion(-0.5);
|
||||
else if (device->detail == 5)
|
||||
app_handleWheelMotion(0.5);
|
||||
else
|
||||
app_handleButtonPress(
|
||||
device->detail > 5 ? device->detail - 2 : device->detail);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue