Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/desktop/wayland/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,15 @@ impl LayerMap {
);
trace!("Arranging layers into {:?}", output_rect.size);

for layer in self.layers.iter() {
let exclusive_surfaces = self
.layers
.iter()
.filter(|l| matches!(l.exclusive_zone(), ExclusiveZone::Exclusive(_)));
let non_exclusive_surfaces = self
.layers
.iter()
.filter(|l| !matches!(l.exclusive_zone(), ExclusiveZone::Exclusive(_)));
for layer in exclusive_surfaces.chain(non_exclusive_surfaces) {
let surface = layer.wl_surface();

with_surface_tree_downward(
Expand Down Expand Up @@ -718,6 +726,16 @@ impl LayerSurface {
pub fn user_data(&self) -> &UserDataMap {
&self.0.userdata
}

fn exclusive_zone(&self) -> ExclusiveZone {
with_states(self.wl_surface(), |states| {
states
.cached_state
.get::<LayerSurfaceCachedState>()
.current()
.exclusive_zone
})
}
}

impl WaylandFocus for LayerSurface {
Expand Down
Loading