From 37e4f83a78509a1a0de2bc3fbe234a5132780454 Mon Sep 17 00:00:00 2001 From: Philipp Schaffrath Date: Fri, 19 Apr 2024 13:29:13 +0200 Subject: [PATCH] Fix stutter while dragging something over an element that stops event propagation (#10737) ~~This is extracted from #10643.~~ ~~It looks like the editor had a small optimization to drop events when hovering the gutter. This also happens while dragging a tab over the gutter, and causes some stuttering. Please correct me if this wasn't just a small optimization, but I could not derive a different reason for this code to exist.~~ The window was waiting for event propagation to update any drag. This change makes sure the drag always gets updated, which makes sure it will always be fluid, no matter if any element stops event propagation. Ty @as-cii for pointing me to a better solution! Release Notes: - Fixed issue where dragging tab over any element that stops event propagation would stutter --- crates/gpui/src/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs index c6a0860656..abddf3e3a7 100644 --- a/crates/gpui/src/window.rs +++ b/crates/gpui/src/window.rs @@ -1299,7 +1299,7 @@ impl<'a> WindowContext<'a> { }); self.window.rendered_frame.mouse_listeners = mouse_listeners; - if self.app.propagate_event && self.has_active_drag() { + if self.has_active_drag() { if event.is::() { // If this was a mouse move event, redraw the window so that the // active drag can follow the mouse cursor.