From 6cfc8c1b1aec2253dd72e3913e6fbb07168b5ff9 Mon Sep 17 00:00:00 2001 From: "Mr. Capybara" Date: Tue, 31 Oct 2023 14:52:09 -0400 Subject: [PATCH] Add extended buttons support for linux --- Source/Engine/Platform/Linux/LinuxWindow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/Engine/Platform/Linux/LinuxWindow.cpp b/Source/Engine/Platform/Linux/LinuxWindow.cpp index a232dea55..f308a0143 100644 --- a/Source/Engine/Platform/Linux/LinuxWindow.cpp +++ b/Source/Engine/Platform/Linux/LinuxWindow.cpp @@ -594,6 +594,12 @@ void LinuxWindow::OnButtonPress(void* event) case Button3: mouseButton = MouseButton::Right; break; + case 8: + mouseButton = MouseButton::Extended2; + break; + case 9: + mouseButton = MouseButton::Extended1; + break; default: return; } @@ -641,6 +647,12 @@ void LinuxWindow::OnButtonRelease(void* event) case Button5: Input::Mouse->OnMouseWheel(ClientToScreen(mousePos), -1.0f, this); break; + case 8: + Input::Mouse->OnMouseUp(ClientToScreen(mousePos), MouseButton::Extended2, this); + break; + case 9: + Input::Mouse->OnMouseUp(ClientToScreen(mousePos), MouseButton::Extended1, this); + break; default: return; }