screencopy: Without draw_cursor, omit dnd icon from toplevel capture
It seems https://github.com/pop-os/cosmic-comp/pull/1638 caused an issue in cosmic-workspaces, where if there are multiple toplevels, when dragging a toplevel, the drag surface would appear in capture for other toplevels. For now, omit drag surface in toplevel capture without `draw_cursor`. Though I guess ultimately we do want it for metadata cursor capture in the portal, but not in cosmic-workspaces? Maybe the protocol needs some additional option for this...
This commit is contained in:
parent
d2f73a6d6c
commit
3c70263e0f
1 changed files with 15 additions and 11 deletions
|
|
@ -602,17 +602,21 @@ pub fn render_window_to_buffer(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(dnd_icon) = get_dnd_icon(&seat) {
|
// TODO cosmic-workspaces wants to omit, but metadata cursor capture in portal should
|
||||||
elements.extend(
|
// still include dnd surface in window capture buffer?
|
||||||
cursor::draw_dnd_icon(
|
if draw_cursor {
|
||||||
renderer,
|
if let Some(dnd_icon) = get_dnd_icon(&seat) {
|
||||||
&dnd_icon.surface,
|
elements.extend(
|
||||||
(location + dnd_icon.offset.to_f64()).to_i32_round(),
|
cursor::draw_dnd_icon(
|
||||||
1.0,
|
renderer,
|
||||||
)
|
&dnd_icon.surface,
|
||||||
.into_iter()
|
(location + dnd_icon.offset.to_f64()).to_i32_round(),
|
||||||
.map(WindowCaptureElement::from),
|
1.0,
|
||||||
);
|
)
|
||||||
|
.into_iter()
|
||||||
|
.map(WindowCaptureElement::from),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue