From 8f833ea0294448c8b7e9e6a09541fa9537867e65 Mon Sep 17 00:00:00 2001 From: Barry Penner <34104395+skytwosea@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:51:14 -0400 Subject: [PATCH] Fix missing on-mouseup when dragging the window on Linux (#17801) Zed Hackathon entry :D Release Notes: - Fixed a bug where Zed would initiate a window move and then refuse to release the mouse. Co-authored-by: Mikayla --- crates/title_bar/src/title_bar.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs index fd3f01e5f78bae13260d6f2543b5e76250f4e92a..e2d45a923b7d065341514aa96f16249dc872c3ba 100644 --- a/crates/title_bar/src/title_bar.rs +++ b/crates/title_bar/src/title_bar.rs @@ -182,6 +182,12 @@ impl Render for TitleBar { .on_mouse_down_out(cx.listener(move |this, _ev, _cx| { this.should_move = false; })) + .on_mouse_up( + gpui::MouseButton::Left, + cx.listener(move |this, _ev, _cx| { + this.should_move = false; + }), + ) .on_mouse_down( gpui::MouseButton::Left, cx.listener(move |this, _ev, _cx| {