Exclude DnD surfaces from workspace capture
Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/25.
This commit is contained in:
parent
2ff8a2d200
commit
f83d80d471
1 changed files with 16 additions and 7 deletions
|
|
@ -390,6 +390,7 @@ pub fn cursor_elements<'frame, R>(
|
||||||
state: &Common,
|
state: &Common,
|
||||||
output: &Output,
|
output: &Output,
|
||||||
mode: CursorMode,
|
mode: CursorMode,
|
||||||
|
exclude_dnd_icon: bool,
|
||||||
) -> Vec<CosmicElement<R>>
|
) -> Vec<CosmicElement<R>>
|
||||||
where
|
where
|
||||||
R: Renderer + ImportAll + ImportMem + AsGlowRenderer,
|
R: Renderer + ImportAll + ImportMem + AsGlowRenderer,
|
||||||
|
|
@ -427,12 +428,14 @@ where
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(wl_surface) = get_dnd_icon(seat) {
|
if !exclude_dnd_icon {
|
||||||
elements.extend(
|
if let Some(wl_surface) = get_dnd_icon(seat) {
|
||||||
cursor::draw_dnd_icon(renderer, &wl_surface, location.to_i32_round(), scale)
|
elements.extend(
|
||||||
.into_iter()
|
cursor::draw_dnd_icon(renderer, &wl_surface, location.to_i32_round(), scale)
|
||||||
.map(CosmicElement::Dnd),
|
.into_iter()
|
||||||
);
|
.map(CosmicElement::Dnd),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let theme = state.theme.cosmic();
|
let theme = state.theme.cosmic();
|
||||||
|
|
@ -481,7 +484,13 @@ where
|
||||||
CosmicMappedRenderElement<R>: RenderElement<R>,
|
CosmicMappedRenderElement<R>: RenderElement<R>,
|
||||||
WorkspaceRenderElement<R>: RenderElement<R>,
|
WorkspaceRenderElement<R>: RenderElement<R>,
|
||||||
{
|
{
|
||||||
let mut elements = cursor_elements(renderer, state, output, cursor_mode);
|
let mut elements = cursor_elements(
|
||||||
|
renderer,
|
||||||
|
state,
|
||||||
|
output,
|
||||||
|
cursor_mode,
|
||||||
|
exclude_workspace_overview,
|
||||||
|
);
|
||||||
|
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue