From 210f7aecfb8bf109eee989b975162a896ff3a6cf Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 4 Jan 2022 11:06:25 +0100 Subject: [PATCH] x11: Support mouse buttons 4 and 5 --- panda/src/x11display/x11GraphicsWindow.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 25d18a96cf..8548d05eea 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -1990,6 +1990,8 @@ get_mouse_button(XButtonEvent &button_event) { return MouseButton::wheel_left(); } else if (index == x_wheel_right_button) { return MouseButton::wheel_right(); + } else if (index >= 8) { + return MouseButton::button(index - 5); } else { return MouseButton::button(index - 1); }