From 9fe46dc8d248d38c5c462991ab7bb57d57b59e2c Mon Sep 17 00:00:00 2001 From: John Tur Date: Fri, 3 Oct 2025 19:25:15 -0400 Subject: [PATCH] Fix double-clicking on non-empty title bar area (#39500) Closes #38685 Release Notes: - N/A --------- Co-authored-by: Julia Ryan --- crates/gpui/src/platform/windows/events.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/windows/events.rs b/crates/gpui/src/platform/windows/events.rs index c1e2040d377da814b261682eb93321fda4ebdb2d..3a51c7ad6d124312790466908bc867c7cf557845 100644 --- a/crates/gpui/src/platform/windows/events.rs +++ b/crates/gpui/src/platform/windows/events.rs @@ -57,7 +57,10 @@ impl WindowsWindowInner { WM_MOUSEMOVE => self.handle_mouse_move_msg(handle, lparam, wparam), WM_MOUSELEAVE | WM_NCMOUSELEAVE => self.handle_mouse_leave_msg(), WM_NCMOUSEMOVE => self.handle_nc_mouse_move_msg(handle, lparam), - WM_NCLBUTTONDOWN => { + // Treat double click as a second single click, since we track the double clicks ourselves. + // If you don't interact with any elements, this will fall through to the windows default + // behavior of toggling whether the window is maximized. + WM_NCLBUTTONDBLCLK | WM_NCLBUTTONDOWN => { self.handle_nc_mouse_down_msg(handle, MouseButton::Left, wparam, lparam) } WM_NCRBUTTONDOWN => {