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.
This commit is contained in:
Smit Barmase authored and GitHub committed 2025-05-27 06:40:22 +05:30
1 parent 458897d5a9
commit aefbcbcd99
1 file changed
+7
+7
View File
@@ -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 => {