shell: Recalculate tiling-layer when layer-shell updates
This commit is contained in:
parent
a9489b50c5
commit
1868f6b0f7
5 changed files with 30 additions and 10 deletions
|
|
@ -1394,8 +1394,13 @@ impl Shell {
|
|||
})
|
||||
};
|
||||
|
||||
let mut map = layer_map_for_output(&output);
|
||||
map.map_layer(&layer_surface).unwrap();
|
||||
{
|
||||
let mut map = layer_map_for_output(&output);
|
||||
map.map_layer(&layer_surface).unwrap();
|
||||
}
|
||||
for workspace in state.common.shell.workspaces.spaces_mut() {
|
||||
workspace.tiling_layer.recalculate(&output);
|
||||
}
|
||||
|
||||
if wants_focus {
|
||||
Shell::set_focus(state, Some(&layer_surface.into()), &seat, None)
|
||||
|
|
|
|||
|
|
@ -237,12 +237,23 @@ impl CompositorHandler for State {
|
|||
self.common.shell.popups.commit(surface);
|
||||
|
||||
// re-arrange layer-surfaces (commits may change size and positioning)
|
||||
if let Some(output) = self.common.shell.outputs().find(|o| {
|
||||
let map = layer_map_for_output(o);
|
||||
map.layer_for_surface(surface, WindowSurfaceType::ALL)
|
||||
.is_some()
|
||||
}) {
|
||||
layer_map_for_output(output).arrange();
|
||||
let layer_output = self
|
||||
.common
|
||||
.shell
|
||||
.outputs()
|
||||
.find(|o| {
|
||||
let map = layer_map_for_output(o);
|
||||
map.layer_for_surface(surface, WindowSurfaceType::ALL)
|
||||
.is_some()
|
||||
})
|
||||
.cloned();
|
||||
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.tiling_layer.recalculate(&output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let mut scheduled_sessions = self.schedule_workspace_sessions(surface);
|
||||
|
|
|
|||
|
|
@ -75,6 +75,10 @@ impl WlrLayerShellHandler for State {
|
|||
map.unmap_layer(&layer);
|
||||
}
|
||||
|
||||
for workspace in self.common.shell.workspaces.spaces_mut() {
|
||||
workspace.tiling_layer.recalculate(&output);
|
||||
}
|
||||
|
||||
// collect screencopy sessions needing an update
|
||||
let mut scheduled_sessions = self.schedule_workspace_sessions(surface.wl_surface());
|
||||
if let Some(sessions) = output.user_data().get::<PendingScreencopyBuffers>() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue