From 3143dc1e847d77e5e77bc5548f1910fe5559728d Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 31 Jul 2021 16:12:52 +1000 Subject: [PATCH] [client] x11: call app_handleWheelMotion for imgui scroll interaction --- client/displayservers/X11/x11.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index 3a6f1d0d..8386320a 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -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; }