shell: Preserve fullscreen state when moving window between workspaces
This commit is contained in:
parent
1dab42ed56
commit
90ce9cab90
2 changed files with 32 additions and 1 deletions
|
|
@ -1235,6 +1235,26 @@ impl Workspace {
|
|||
res
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn take_fullscreen(
|
||||
&mut self,
|
||||
) -> Option<(
|
||||
Option<FullscreenRestoreState>,
|
||||
Option<Rectangle<i32, Local>>,
|
||||
)> {
|
||||
let surface = self.fullscreen.take()?;
|
||||
if surface.ended_at.is_some() {
|
||||
self.fullscreen = Some(surface);
|
||||
return None;
|
||||
}
|
||||
|
||||
for focus_stack in self.focus_stack.0.values_mut() {
|
||||
focus_stack.retain(|t| t != &surface.surface);
|
||||
}
|
||||
|
||||
Some((surface.previous_state, surface.previous_geometry))
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn remove_fullscreen(
|
||||
&mut self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue