diff --git a/client-toolkit/src/workspace.rs b/client-toolkit/src/workspace.rs index 0e5916664d..c29af4dcc8 100644 --- a/client-toolkit/src/workspace.rs +++ b/client-toolkit/src/workspace.rs @@ -20,6 +20,7 @@ pub struct Workspace { pub coordinates: Vec, pub state: Vec>, pub capabilities: Vec>, + pub tiling: Option>, } #[derive(Debug)] @@ -35,7 +36,7 @@ impl WorkspaceState { { Self { workspace_groups: Vec::new(), - manager: GlobalProxy::from(registry.bind_one(qh, 1..=1, ())), + manager: GlobalProxy::from(registry.bind_one(qh, 1..=2, ())), } } @@ -141,6 +142,7 @@ where coordinates: Vec::new(), state: Vec::new(), capabilities: Vec::new(), + tiling: None, }); } zcosmic_workspace_group_handle_v1::Event::Remove => { @@ -202,6 +204,9 @@ where .map(|chunk| WEnum::from(u32::from_ne_bytes(chunk.try_into().unwrap()))) .collect(); } + zcosmic_workspace_handle_v1::Event::TilingState { state } => { + workspace.tiling_enabled = Some(state); + } zcosmic_workspace_handle_v1::Event::Remove => { for group in state.workspace_state().workspace_groups.iter_mut() { if let Some(idx) = group.workspaces.iter().position(|w| &w.handle == handle) { diff --git a/unstable/cosmic-workspace-unstable-v1.xml b/unstable/cosmic-workspace-unstable-v1.xml index 76adedd9bb..ff36b5d390 100644 --- a/unstable/cosmic-workspace-unstable-v1.xml +++ b/unstable/cosmic-workspace-unstable-v1.xml @@ -213,7 +213,7 @@ - + A zcosmic_workspace_handle_v1 object represents a a workspace that handles a group of surfaces. @@ -291,6 +291,8 @@ + + @@ -360,5 +362,39 @@ There is no guarantee the workspace will be actually removed. + + + + This event is emitted immediately after the zcosmic_workspace_handle_v1 is created + and each time the workspace tiling state changes, either because of a + compositor action or because of a request in this protocol. + + + + + + + + + + + + + + Request that this workspace is renamed. + + There is no guarantee the workspace will actually be renamed. + + + + + + + Request that this workspace's tiling state is changed. + + There is no guarantee the workspace will actually change it's tiling state. + + +