mirror of https://github.com/buggins/dlangui.git
Recognize mouse wheel events on x11. Fix #476
This commit is contained in:
parent
4c6cc85481
commit
27b875a4a7
|
@ -1505,7 +1505,11 @@ class X11Platform : Platform {
|
|||
Log.d("X11: ButtonPress event");
|
||||
X11Window w = findWindow(event.xbutton.window);
|
||||
if (w) {
|
||||
w.processMouseEvent(MouseAction.ButtonDown, event.xbutton.button, event.xbutton.state, event.xbutton.x, event.xbutton.y);
|
||||
if (event.xbutton.button == 4 || event.xbutton.button == 5) {
|
||||
w.processMouseEvent(MouseAction.Wheel, 0, 0, 0, event.xbutton.button == 4 ? 1 : -1);
|
||||
} else {
|
||||
w.processMouseEvent(MouseAction.ButtonDown, event.xbutton.button, event.xbutton.state, event.xbutton.x, event.xbutton.y);
|
||||
}
|
||||
} else {
|
||||
Log.e("Window not found");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue