input: Make sure to update internal pointer position state on tool input
This commit is contained in:
parent
67aa6a0c49
commit
a66f629a4e
1 changed files with 48 additions and 0 deletions
|
|
@ -1590,6 +1590,7 @@ impl State {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let current_output = seat.active_output();
|
||||||
let position =
|
let position =
|
||||||
transform_output_mapped_position(&output, &event, shell.zoom_state());
|
transform_output_mapped_position(&output, &event, shell.zoom_state());
|
||||||
let under = State::surface_under(position, &output, &shell)
|
let under = State::surface_under(position, &output, &shell)
|
||||||
|
|
@ -1652,6 +1653,29 @@ impl State {
|
||||||
|
|
||||||
tool.frame(self, event.time());
|
tool.frame(self, event.time());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut shell = self.common.shell.write();
|
||||||
|
shell.update_pointer_position(position.to_local(&output), &output);
|
||||||
|
shell.update_focal_point(
|
||||||
|
&seat,
|
||||||
|
position,
|
||||||
|
self.common.config.cosmic_conf.accessibility_zoom.view_moves,
|
||||||
|
);
|
||||||
|
|
||||||
|
if output != current_output {
|
||||||
|
for session in cursor_sessions_for_output(&shell, ¤t_output) {
|
||||||
|
session.set_cursor_pos(None);
|
||||||
|
}
|
||||||
|
seat.set_active_output(&output);
|
||||||
|
}
|
||||||
|
|
||||||
|
update_output_image_copy_cursor_position(
|
||||||
|
&shell,
|
||||||
|
&self.common.clock,
|
||||||
|
&output,
|
||||||
|
&seat,
|
||||||
|
position,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
InputEvent::TabletToolProximity { event, .. } => {
|
InputEvent::TabletToolProximity { event, .. } => {
|
||||||
|
|
@ -1670,6 +1694,7 @@ impl State {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let current_output = seat.active_output();
|
||||||
let position =
|
let position =
|
||||||
transform_output_mapped_position(&output, &event, shell.zoom_state());
|
transform_output_mapped_position(&output, &event, shell.zoom_state());
|
||||||
let under = State::surface_under(position, &output, &shell)
|
let under = State::surface_under(position, &output, &shell)
|
||||||
|
|
@ -1761,6 +1786,29 @@ impl State {
|
||||||
|
|
||||||
tool.frame(self, event.time());
|
tool.frame(self, event.time());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut shell = self.common.shell.write();
|
||||||
|
shell.update_pointer_position(position.to_local(&output), &output);
|
||||||
|
shell.update_focal_point(
|
||||||
|
&seat,
|
||||||
|
position,
|
||||||
|
self.common.config.cosmic_conf.accessibility_zoom.view_moves,
|
||||||
|
);
|
||||||
|
|
||||||
|
if output != current_output {
|
||||||
|
for session in cursor_sessions_for_output(&shell, ¤t_output) {
|
||||||
|
session.set_cursor_pos(None);
|
||||||
|
}
|
||||||
|
seat.set_active_output(&output);
|
||||||
|
}
|
||||||
|
|
||||||
|
update_output_image_copy_cursor_position(
|
||||||
|
&shell,
|
||||||
|
&self.common.clock,
|
||||||
|
&output,
|
||||||
|
&seat,
|
||||||
|
position,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
InputEvent::TabletToolTip { event, .. } => {
|
InputEvent::TabletToolTip { event, .. } => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue