shell: Drop static workspaces
This commit is contained in:
parent
226bf7f49d
commit
c0f7524a09
4 changed files with 157 additions and 261 deletions
|
|
@ -8,6 +8,7 @@ use crate::{
|
|||
WorkspaceHandler, WorkspaceState,
|
||||
},
|
||||
};
|
||||
use cosmic_protocols::workspace::v1::server::zcosmic_workspace_handle_v1::TilingState;
|
||||
use smithay::reexports::wayland_server::DisplayHandle;
|
||||
|
||||
impl WorkspaceClientHandler for ClientState {
|
||||
|
|
@ -40,6 +41,25 @@ impl WorkspaceHandler for State {
|
|||
let _ = self.common.shell.activate(&output, idx); // TODO: move cursor?
|
||||
}
|
||||
}
|
||||
Request::SetTilingState { workspace, state } => {
|
||||
let seat = self.common.last_active_seat().clone();
|
||||
if let Some(workspace) = self
|
||||
.common
|
||||
.shell
|
||||
.workspaces
|
||||
.space_for_handle_mut(&workspace)
|
||||
{
|
||||
let mut guard = self.common.shell.workspace_state.update();
|
||||
workspace.set_tiling(
|
||||
match state.into_result() {
|
||||
Ok(TilingState::FloatingOnly) => false,
|
||||
_ => true,
|
||||
},
|
||||
&seat,
|
||||
&mut guard,
|
||||
);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue