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 2025-05-27 06:40:22 +05:30 committed by GitHub
parent 2a8242ac90
commit 5e72c2a870
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 => {