render: Use NamespaceElements to fix blurred lower layer-shell surfaces

This commit is contained in:
Victoria Brekenfeld 2026-03-06 17:19:12 +01:00 committed by Victoria Brekenfeld
parent a9bf89d8b2
commit eb41b076ed
6 changed files with 134 additions and 45 deletions

View file

@ -55,7 +55,7 @@ use smithay::{
Color32F, Offscreen, Texture, TextureFilter,
damage::{Error as RenderError, OutputDamageTracker, RenderOutputResult},
element::{
Element, Id, Kind, RenderElement, WeakId,
Element, Id, Kind, NamespacedElement, RenderElement, WeakId,
texture::{TextureRenderBuffer, TextureRenderElement},
utils::{
ConstrainAlign, ConstrainScaleBehavior, CropRenderElement, Relocate,
@ -825,7 +825,10 @@ where
})
}
Stage::LayerPopup {
popup, location, ..
popup,
location,
workspace_idx,
..
} => {
let mut geometry = popup.geometry().as_global();
geometry.loc += location;
@ -843,11 +846,20 @@ where
false,
[0; 4],
FRAME_TIME_FILTER,
&mut |elem| elements.extend(crop_to_output(elem.into()).map(Into::into)),
&mut |elem| {
elements.extend(
crop_to_output(NamespacedElement::new(elem, workspace_idx).into())
.map(Into::into),
)
},
None,
)
}
Stage::LayerSurface { layer, location } => {
Stage::LayerSurface {
layer,
location,
workspace_idx,
} => {
let mut geometry = layer.geometry().as_global();
geometry.loc += location;
@ -864,7 +876,12 @@ where
false,
[0; 4],
FRAME_TIME_FILTER,
&mut |elem| elements.extend(crop_to_output(elem.into()).map(Into::into)),
&mut |elem| {
elements.extend(
crop_to_output(NamespacedElement::new(elem, workspace_idx).into())
.map(Into::into),
)
},
None,
);
}