Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cyclane committed May 27, 2023
1 parent 7f425f5 commit f6623d0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions rnote-ui/src/canvas/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,7 @@ pub(crate) fn handle_pointer_controller_event(
}
}

if matches!(state, PenState::Down) {
canvas.set_pen_input_source(input_source);
} else {
canvas.set_pen_input_source(None);
}

canvas.set_pen_input_source(input_source);
canvas.emit_handle_widget_flags(widget_flags);
(Inhibit(inhibit), state)
}
Expand Down Expand Up @@ -291,6 +286,7 @@ fn reject_pointer_input(
input_source_matches: bool,
touch_drawing: bool,
) -> bool {
// If pen is already down, reject events from other input sources
if matches!(state, PenState::Down) && !input_source_matches {
return true;
}
Expand Down

0 comments on commit f6623d0

Please sign in to comment.