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:
parent
5043eaedc4
commit
7a55da58d9
17 changed files with 28 additions and 127 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue