From 5e72c2a8701b9397aac12a325c03ee2f43aa41b6 Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Tue, 27 May 2025 06:40:22 +0530 Subject: [PATCH] editor: Show hidden mouse cursor on window activation (#31475) Closes #31349 Release Notes: - Fixed issue where hidden mouse cursor would stay hidden even after switching windows. --- crates/editor/src/editor.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 4334e1336e8cd36e264e8fa38b7d6b95d5b5a2fc..4b3c46d4a675e0e1b308085c8c2918d834e08e19 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -1921,6 +1921,9 @@ impl Editor { blink_manager.disable(cx); } }); + if active { + editor.show_mouse_cursor(); + } }), ], tasks_update_task: None, @@ -2159,6 +2162,10 @@ impl Editor { key_context } + fn show_mouse_cursor(&mut self) { + self.mouse_cursor_hidden = false; + } + pub fn hide_mouse_cursor(&mut self, origin: &HideMouseCursorOrigin) { self.mouse_cursor_hidden = match origin { HideMouseCursorOrigin::TypingAction => {