From 0b93a30821fa6103da0ce8db6b8ebb40e76696ec Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 8 Aug 2023 17:39:45 -0700 Subject: [PATCH] Terminate synthetic drag state on mouse up w/ ctrl held Co-authored-by: Mikayla --- crates/gpui/src/platform/mac/window.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/mac/window.rs b/crates/gpui/src/platform/mac/window.rs index c0f0ade7b926b59dc3a49a714483f576f3a64026..83469b82954a327ad1acaae1adee2f21aabb2625 100644 --- a/crates/gpui/src/platform/mac/window.rs +++ b/crates/gpui/src/platform/mac/window.rs @@ -1086,7 +1086,10 @@ extern "C" fn handle_view_event(this: &Object, _: Sel, native_event: id) { button: MouseButton::Left, modifiers: Modifiers { ctrl: true, .. }, .. - }) => return, + }) => { + window_state_borrow.synthetic_drag_counter += 1; + return; + } _ => None, };