Revert "Hide the mouse when the user is typing in the editor (#25040)" (#25393)

This reverts commit a8610fbd13.

I've been seeing some reports of segmentation faults that appear to
point to this change as the culprit.

Closes #25366.

Release Notes:

- Community: Reverted #25040, so remove the corresponding entry from the
release notes.
This commit is contained in:
Marshall Bowers 2025-02-22 10:19:23 -05:00 committed by GitHub
parent 5043eaedc4
commit 7a55da58d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 28 additions and 127 deletions

View file

@ -1121,19 +1121,7 @@ fn handle_nc_mouse_up_msg(
}
fn handle_cursor_changed(lparam: LPARAM, state_ptr: Rc<WindowsWindowStatePtr>) -> Option<isize> {
let mut state = state_ptr.state.borrow_mut();
let had_cursor = state.current_cursor.is_some();
state.current_cursor = if lparam.0 == 0 {
None
} else {
Some(HCURSOR(lparam.0 as _))
};
if had_cursor != state.current_cursor.is_some() {
unsafe { SetCursor(state.current_cursor.as_ref()) };
}
state_ptr.state.borrow_mut().current_cursor = HCURSOR(lparam.0 as _);
Some(0)
}
@ -1144,9 +1132,7 @@ fn handle_set_cursor(lparam: LPARAM, state_ptr: Rc<WindowsWindowStatePtr>) -> Op
) {
return None;
}
unsafe {
SetCursor(state_ptr.state.borrow().current_cursor.as_ref());
};
unsafe { SetCursor(state_ptr.state.borrow().current_cursor) };
Some(1)
}