wzrd

An ICCCM & EWMH compliant X11 reparenting, dynamic window manager, written in Rust
git clone git://git.deurzen.net/wzrd
Log | Files | Refs | LICENSE

commit 63d29882035c00b5bcdf0dd76c54994b65332654
parent 56a9de70cd1b817155b1595874449fa66bfdf736
Author: deurzen <m.deurzen@tum.de>
Date:   Wed, 17 Mar 2021 04:03:48 +0100

adds proper zone removal

Diffstat:
Msrc/core/model.rs | 3+++
Msrc/core/workspace.rs | 2--
Msrc/core/zone.rs | 15+++++++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/core/model.rs b/src/core/model.rs @@ -1009,8 +1009,11 @@ impl<'a> Model<'a> { } } + self.zone_manager.remove_zone(id); + self.workspaces.get_mut(workspace).map(|w| { w.remove_zone(id); + w.remove_client(window); w.remove_icon(window); }); diff --git a/src/core/workspace.rs b/src/core/workspace.rs @@ -458,8 +458,6 @@ impl Workspace { .active_data_mut(id) .ok_or(StateChangeError::EarlyStop)?; - println!("PREV DATA TO DATA {:?}", prev_data); - Ok(*data = prev_data) } diff --git a/src/core/zone.rs b/src/core/zone.rs @@ -968,6 +968,21 @@ impl ZoneManager { id } + pub fn remove_zone( + &mut self, + id: ZoneId, + ) { + let cycle = self.nearest_cycle(id); + let cycle = self.zone_map.get_mut(&cycle).unwrap(); + + match &mut cycle.content { + ZoneContent::Tab(zones) | ZoneContent::Layout(_, zones) => { + zones.remove_for(&Selector::AtIdent(id)); + }, + _ => {}, + } + } + pub fn activate_zone( &mut self, id: ZoneId,