Fix: macOS 2 finger tap moves moves slider instead of opening context menu (#12375)

This commit is contained in:
Boštjan Čadež
2026-02-25 12:20:57 +01:00
committed by GitHub
parent db1fe73e85
commit d604cc9697

View File

@@ -1470,10 +1470,11 @@ void IMSlider::on_mouse_wheel(wxMouseEvent& evt) {
ImGuiWrapper& imgui = *wxGetApp().imgui();
float wheel = 0.0f;
wheel = evt.GetWheelRotation() > 0 ? 1.0f : -1.0f;
float wheel = evt.GetWheelRotation();
// mac trackpads trigger this event with value 0 when right-clicking with two fingers
if (wheel == 0.0f)
return;
wheel = wheel > 0 ? 1.0f : -1.0f;
#ifdef __WXOSX__
if (wxGetKeyState(WXK_SHIFT)) {