Fix two mouse event bugs (#2835)

This PR fixes two bugs we discovered in Zed's mouse event handling while
investigating an interesting and mysterious bug we we were seeing, where
spurious `MouseMoved` events would continuously be dispatched after
control-clicking.

Release Notes:

- Fixed a rendering glitch that could occur after control-clicking
certain elements.
This commit is contained in:
Mikayla Maki 2023-08-09 09:04:32 -07:00 committed by GitHub
commit 40030f32d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View file

@ -1087,7 +1087,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,
};