Skip to content

Commit

Permalink
Remove some renderer.is_active checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jul 23, 2024
1 parent f1feecd commit 72cba89
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions packages/dioxus-blitz/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,6 @@ impl<'a, Doc: DocumentLike> View<'a, Doc> {
return;
};

if !self.renderer.is_active() {
return;
};

if self.devtools.highlight_hover {
let mut node = self.dom.as_ref().get_node(node_id).unwrap();
if button == "right" {
Expand Down Expand Up @@ -359,20 +355,14 @@ impl<'a, Doc: DocumentLike> View<'a, Doc> {
WindowEvent::CursorEntered { /*device_id*/.. } => {}
WindowEvent::CursorLeft { /*device_id*/.. } => {}
WindowEvent::CursorMoved { position, .. } => {
let changed = if self.renderer.is_active() {
let winit::dpi::LogicalPosition::<f32> { x, y } = position.to_logical(self.window.scale_factor());
self.mouse_move(x, y)
} else {
false
};
let winit::dpi::LogicalPosition::<f32> { x, y } = position.to_logical(self.window.scale_factor());
let changed = self.mouse_move(x, y);

if changed {
let cursor = self.dom.as_ref().get_cursor();
if let Some(cursor) = cursor {
if self.renderer.is_active() {
self.window.set_cursor(stylo_to_winit::cursor(cursor));
self.request_redraw();
}
}
}
}
Expand Down

0 comments on commit 72cba89

Please sign in to comment.