image-copy: Only embed cursor in toplevel capture if focused
This commit is contained in:
parent
270ba7bf80
commit
d7d6be3cdb
1 changed files with 5 additions and 0 deletions
|
|
@ -614,6 +614,11 @@ pub fn render_window_to_buffer(
|
||||||
let pointer_loc = pointer.current_location().to_i32_round().as_global();
|
let pointer_loc = pointer.current_location().to_i32_round().as_global();
|
||||||
let mut location = None;
|
let mut location = None;
|
||||||
if let Some(element) = shell.element_for_surface(toplevel)
|
if let Some(element) = shell.element_for_surface(toplevel)
|
||||||
|
&& pointer
|
||||||
|
.current_focus()
|
||||||
|
.and_then(|f| f.toplevel(&shell))
|
||||||
|
.as_ref()
|
||||||
|
== Some(toplevel)
|
||||||
&& element.has_active_window(toplevel)
|
&& element.has_active_window(toplevel)
|
||||||
&& let Some(workspace) = shell.space_for(element)
|
&& let Some(workspace) = shell.space_for(element)
|
||||||
&& let Some(geometry) = workspace.element_geometry(element)
|
&& let Some(geometry) = workspace.element_geometry(element)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue