shell: Lift recalculate to consider sticky_layer
This commit is contained in:
parent
769b7d6996
commit
10c196a080
3 changed files with 9 additions and 6 deletions
|
|
@ -795,6 +795,13 @@ impl Workspaces {
|
|||
self.refresh(workspace_state, toplevel_info_state, xdg_activation_state)
|
||||
}
|
||||
|
||||
pub fn recalculate(&mut self) {
|
||||
for set in self.sets.values_mut() {
|
||||
set.sticky_layer.refresh();
|
||||
set.workspaces.iter_mut().for_each(|w| w.recalculate());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn refresh(
|
||||
&mut self,
|
||||
workspace_state: &mut WorkspaceUpdateGuard<'_, State>,
|
||||
|
|
|
|||
|
|
@ -252,9 +252,7 @@ impl CompositorHandler for State {
|
|||
if let Some(output) = layer_output {
|
||||
let changed = layer_map_for_output(&output).arrange();
|
||||
if changed {
|
||||
for workspace in self.common.shell.workspaces.spaces_mut() {
|
||||
workspace.recalculate();
|
||||
}
|
||||
self.common.shell.workspaces.recalculate();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,9 +74,7 @@ impl WlrLayerShellHandler for State {
|
|||
map.unmap_layer(&layer);
|
||||
}
|
||||
|
||||
for workspace in self.common.shell.workspaces.spaces_mut() {
|
||||
workspace.recalculate();
|
||||
}
|
||||
self.common.shell.workspaces.recalculate();
|
||||
|
||||
// collect screencopy sessions needing an update
|
||||
let mut scheduled_sessions = self.schedule_workspace_sessions(surface.wl_surface());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue