shell: Move space_for_handle into Workspaces

This commit is contained in:
Victoria Brekenfeld 2023-11-22 12:45:29 +01:00 committed by Victoria Brekenfeld
parent c09a735289
commit 996b5a8227
4 changed files with 36 additions and 16 deletions

View file

@ -506,6 +506,7 @@ where
if current.0 != desc.handle {
state
.shell
.workspaces
.space_for_handle(&desc.handle)
.map(|w| w.tiling_layer.tree())
} else {
@ -532,6 +533,7 @@ where
let workspace = state
.shell
.workspaces
.space_for_handle(&current.0)
.ok_or(OutputNoMode)?;
@ -563,6 +565,7 @@ where
let workspace = state
.shell
.workspaces
.space_for_handle(&previous)
.ok_or(OutputNoMode)?;
let has_fullscreen = workspace.fullscreen.is_some();