Set cursor style only if we're the active window
This commit is contained in:
parent
97eae4b081
commit
b87c45e6f5
1 changed files with 6 additions and 1 deletions
|
@ -1285,12 +1285,17 @@ impl<'a> WindowContext<'a> {
|
||||||
mem::swap(&mut window.rendered_frame, &mut window.next_frame);
|
mem::swap(&mut window.rendered_frame, &mut window.next_frame);
|
||||||
|
|
||||||
let scene = self.window.rendered_frame.scene_builder.build();
|
let scene = self.window.rendered_frame.scene_builder.build();
|
||||||
|
|
||||||
|
// Set the cursor only if we're the active window.
|
||||||
let cursor_style = self
|
let cursor_style = self
|
||||||
.window
|
.window
|
||||||
.requested_cursor_style
|
.requested_cursor_style
|
||||||
.take()
|
.take()
|
||||||
.unwrap_or(CursorStyle::Arrow);
|
.unwrap_or(CursorStyle::Arrow);
|
||||||
self.platform.set_cursor_style(cursor_style);
|
if self.is_window_active() {
|
||||||
|
self.platform.set_cursor_style(cursor_style);
|
||||||
|
}
|
||||||
|
|
||||||
self.window.dirty = false;
|
self.window.dirty = false;
|
||||||
|
|
||||||
scene
|
scene
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue