From 4d146cb39dd2e08a7df7fea97d01c6f1a1d5a98e Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 22 Feb 2015 17:31:32 +0100 Subject: [PATCH] Fixed hole in mouse button sequence on X11. --- README.md | 1 + src/x11_window.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 076bd0e8..1ed96d1f 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ GLFW bundles a number of dependencies in the `deps/` directory. - [X11] Added support for Cygwin-X - [X11] Made XInput2 optional at compile-time - [X11] Made Xxf86vm optional at compile-time + - [X11] Bugfix: Mouse button `GLFW_MOUSE_BUTTON_4` was never used - [X11] Bugfix: `glfwTerminate` could close an unrelated file descriptor - [X11] Bugfix: Some WMs did not respect cursor redefinition diff --git a/src/x11_window.c b/src/x11_window.c index 950078fa..f30cf6f8 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1011,7 +1011,7 @@ static void processEvent(XEvent *event) // Additional buttons after 7 are treated as regular buttons // We subtract 4 to fill the gap left by scroll input above _glfwInputMouseClick(window, - event->xbutton.button - 4, + event->xbutton.button - Button1 - 4, GLFW_PRESS, mods); }