From 3060e4170ea5ef0e6886b9ac1853aaead9ddd59f Mon Sep 17 00:00:00 2001 From: Gustaf Johansson Date: Mon, 30 Mar 2026 00:11:57 +0200 Subject: [PATCH] gpui: Add middle and right click mouse events for macOS (#49637) - [x] Added a solid test coverage and/or screenshots from doing manual testing Manual testing performed successfully on Tahoe 26.2. - [x] Done a self-review taking into account security and performance aspects - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - Fixed missing right- and middle-mouse button drag on MacOS Co-authored-by: MrSubidubi --- crates/gpui_macos/src/window.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/gpui_macos/src/window.rs b/crates/gpui_macos/src/window.rs index 51758ae095ef29901dd3fbb550e9c863ceaf3762..398cf46eab09dc8412ffdda8eb550b8ad4e09b40 100644 --- a/crates/gpui_macos/src/window.rs +++ b/crates/gpui_macos/src/window.rs @@ -188,6 +188,14 @@ unsafe fn build_classes() { sel!(mouseDragged:), handle_view_event as extern "C" fn(&Object, Sel, id), ); + decl.add_method( + sel!(rightMouseDragged:), + handle_view_event as extern "C" fn(&Object, Sel, id), + ); + decl.add_method( + sel!(otherMouseDragged:), + handle_view_event as extern "C" fn(&Object, Sel, id), + ); decl.add_method( sel!(scrollWheel:), handle_view_event as extern "C" fn(&Object, Sel, id),