diff --git a/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs b/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs index b4addfc6..7679da5b 100644 --- a/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs +++ b/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs @@ -317,6 +317,7 @@ impl XdgToplevel { _ => return, }; let extents = self.xdg.extents.get(); + parent.child_active_changed(self, self.active_surfaces.get() > 0); parent.child_size_changed(self, extents.width(), extents.height()); parent.child_title_changed(self, self.title.borrow_mut().deref()); } diff --git a/src/tree/container.rs b/src/tree/container.rs index 33d967d2..3ad5ca87 100644 --- a/src/tree/container.rs +++ b/src/tree/container.rs @@ -61,6 +61,7 @@ tree_id!(ContainerNodeId); pub struct ContainerNode { pub id: ContainerNodeId, pub parent: CloneCell>, + active: Cell, pub split: Cell, title: RefCell, pub mono_child: CloneCell>>, @@ -154,6 +155,7 @@ impl ContainerNode { Self { id: state.node_ids.next(), parent: CloneCell::new(parent), + active: Cell::new(false), split: Cell::new(split), title: Default::default(), mono_child: CloneCell::new(None), @@ -753,6 +755,7 @@ impl Node for ContainerNode { } fn active_changed(&self, active: bool) { + self.active.set(active); self.parent.get().child_active_changed(self, active); } @@ -1009,6 +1012,7 @@ impl Node for ContainerNode { fn set_parent(self: Rc, parent: Rc) { self.parent.set(parent.clone()); + parent.child_active_changed(&*self, self.active.get()); parent.child_size_changed(&*self, self.width.get(), self.height.get()); parent .clone() diff --git a/todo.md b/todo.md index 6f0070b8..2122b50c 100644 --- a/todo.md +++ b/todo.md @@ -1,7 +1,6 @@ # todo - Container moving (mouse) -- Container moving (kb) - Float toggle - Workspaces - Float moving @@ -11,6 +10,7 @@ # done +- Container moving (kb) - Container resizing - clipboard - primary selection