image-copy: Update toplevel cursor position for cursor_follows_focus
This commit is contained in:
parent
6c6b56a7f3
commit
270ba7bf80
2 changed files with 9 additions and 1 deletions
|
|
@ -2521,7 +2521,7 @@ fn mapped_output_for_device<'a, D: Device + 'static>(
|
||||||
map_to_output.or_else(|| shell.builtin_output())
|
map_to_output.or_else(|| shell.builtin_output())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_output_image_copy_cursor_position(
|
pub fn update_output_image_copy_cursor_position(
|
||||||
shell: &Shell,
|
shell: &Shell,
|
||||||
clock: &Clock<Monotonic>,
|
clock: &Clock<Monotonic>,
|
||||||
output: &Output,
|
output: &Output,
|
||||||
|
|
|
||||||
|
|
@ -378,6 +378,14 @@ fn update_focus_state(
|
||||||
.cloned()
|
.cloned()
|
||||||
.unwrap_or(seat.active_output());
|
.unwrap_or(seat.active_output());
|
||||||
|
|
||||||
|
crate::input::update_output_image_copy_cursor_position(
|
||||||
|
&shell,
|
||||||
|
&state.common.clock,
|
||||||
|
&output,
|
||||||
|
seat,
|
||||||
|
new_pos,
|
||||||
|
);
|
||||||
|
|
||||||
let focus = State::surface_under(new_pos, &output, &shell)
|
let focus = State::surface_under(new_pos, &output, &shell)
|
||||||
.map(|(focus, loc)| (focus, loc.as_logical()));
|
.map(|(focus, loc)| (focus, loc.as_logical()));
|
||||||
//drop here to avoid multiple borrows
|
//drop here to avoid multiple borrows
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue