Skip to content

Commit

Permalink
anvil: Apply output transform to tablet events
Browse files Browse the repository at this point in the history
  • Loading branch information
ids1024 authored and Drakulix committed Nov 25, 2024
1 parent ac6627b commit 49ddf6e
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions anvil/src/input_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -924,15 +924,7 @@ impl AnvilState<UdevData> {
fn on_tablet_tool_axis<B: InputBackend>(&mut self, evt: B::TabletToolAxisEvent) {
let tablet_seat = self.seat.tablet_seat();

let output_geometry = self
.space
.outputs()
.next()
.map(|o| self.space.output_geometry(o).unwrap());

if let Some(rect) = output_geometry {
let pointer_location = evt.position_transformed(rect.size) + rect.loc.to_f64();

if let Some(pointer_location) = self.touch_location_transformed(&evt) {
let pointer = self.pointer.clone();
let under = self.surface_under(pointer_location);
let tablet = tablet_seat.get_tablet(&TabletDescriptor::from(&evt.device()));
Expand Down Expand Up @@ -988,18 +980,10 @@ impl AnvilState<UdevData> {
) {
let tablet_seat = self.seat.tablet_seat();

let output_geometry = self
.space
.outputs()
.next()
.map(|o| self.space.output_geometry(o).unwrap());

if let Some(rect) = output_geometry {
if let Some(pointer_location) = self.touch_location_transformed(&evt) {
let tool = evt.tool();
tablet_seat.add_tool::<Self>(self, dh, &tool);

let pointer_location = evt.position_transformed(rect.size) + rect.loc.to_f64();

let pointer = self.pointer.clone();
let under = self.surface_under(pointer_location);
let tablet = tablet_seat.get_tablet(&TabletDescriptor::from(&evt.device()));
Expand Down

0 comments on commit 49ddf6e

Please sign in to comment.