mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 12:38:02 +00:00
Only set the cursor style once per mouse move event
This will hopefully prevent some of the intermittent flickering we seem to be seeing.
This commit is contained in:
parent
5ab21cc0fd
commit
ac6880b6ee
1 changed files with 3 additions and 2 deletions
|
@ -181,13 +181,14 @@ impl Presenter {
|
|||
self.last_mouse_moved_event = Some(event.clone());
|
||||
|
||||
if !left_mouse_down {
|
||||
cx.platform().set_cursor_style(CursorStyle::Arrow);
|
||||
let mut style_to_assign = CursorStyle::Arrow;
|
||||
for (bounds, style) in self.cursor_styles.iter().rev() {
|
||||
if bounds.contains_point(position) {
|
||||
cx.platform().set_cursor_style(*style);
|
||||
style_to_assign = *style;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cx.platform().set_cursor_style(style_to_assign);
|
||||
}
|
||||
}
|
||||
Event::LeftMouseDragged { position } => {
|
||||
|
|
Loading…
Reference in a new issue