GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
feat: use inner container in workspace
Lars Bergerf1dde1631a2d
diff --git a/packages/wm/src/containers/root_container.rs b/packages/wm/src/containers/root_container.rsindex 2e10cbf3..a5d77bb4 100644--- a/packages/wm/src/containers/root_container.rs+++ b/packages/wm/src/containers/root_container.rs@@ -1,15 +1,13 @@-use uuid::Uuid;-use crate::containers::{Container, ContainerType};use super::InnerContainer;pub struct RootContainer {+ inner: InnerContainer,width: u32,height: u32,x: u32,y: u32,- inner: InnerContainer,}impl RootContainer {diff --git a/packages/wm/src/workspaces/workspace.rs b/packages/wm/src/workspaces/workspace.rsindex 41370bbf..608059d1 100644--- a/packages/wm/src/workspaces/workspace.rs+++ b/packages/wm/src/workspaces/workspace.rs@@ -1,16 +1,10 @@-use std::sync::Arc;--use uuid::Uuid;-use crate::{common::RectDelta,- containers::{Container, ContainerType},- monitors::Monitor,+ containers::{Container, ContainerType, InnerContainer},};pub struct Workspace {- id: Uuid,- parent: Monitor,+ inner: InnerContainer,name: String,display_name: String,keep_alive: bool,@@ -23,22 +17,20 @@ impl Workspace {display_name: String,keep_alive: bool,outer_gaps: RectDelta,- parent: Monitor,) -> Self {Self {- id: Uuid::new_v4(),+ inner: InnerContainer::new(None, vec![]),name,display_name,keep_alive,outer_gaps,- parent,}}}impl Container for Workspace {- fn id(&self) -> Uuid {- self.id+ fn inner(&self) -> InnerContainer {+ self.inner}fn r#type(&self) -> ContainerType {@@ -60,34 +52,4 @@ impl Container for Workspace {fn y(&self) -> u32 {todo!()}-- fn parent(&self) -> Arc<dyn Container> {- todo!()- }-- fn children(&self) -> Vec<Arc<dyn Container>> {- todo!()- }-- fn child_focus_order(&self) -> Vec<Arc<dyn Container>> {- todo!()- }-- fn set_parent(&mut self, parent: std::sync::Arc<dyn Container>) -> () {- todo!()- }-- fn set_children(- &self,- children: Vec<std::sync::Arc<dyn Container>>,- ) -> () {- todo!()- }-- fn set_child_focus_order(- &self,- child_focus_order: Vec<std::sync::Arc<dyn Container>>,- ) -> () {- todo!()- }}