forge
Explore
Log in

Don't you dare go Hollow

layout: Use column.contains more

Browse files at this commit

4dd7578fe7c55e4b3154b212d757632d173c76c2Ivan MolodetskikhParent: ea72e4d
src/layout/mod.rsmodified+1 -1
@@ -1088,7 +1088,7 @@ impl<W: LayoutElement> Layout<W> {
10881088 for mon in &*monitors {
10891089 for ws in &mon.workspaces {
10901090 for col in &ws.columns {
1091- if col.windows.contains(&window) {
1091+ if col.contains(&window) {
10921092 width = Some(col.width);
10931093 is_full_width = col.is_full_width;
10941094 break;
src/layout/workspace.rsmodified+2 -2
@@ -855,7 +855,7 @@ impl<W: LayoutElement> Workspace<W> {
855855 let col = self
856856 .columns
857857 .iter_mut()
858- .find(|col| col.windows.contains(window))
858+ .find(|col| col.contains(window))
859859 .unwrap();
860860 let value = !col.is_fullscreen;
861861 self.set_fullscreen(window, value);
@@ -1023,7 +1023,7 @@ impl<W: LayoutElement> Column<W> {
10231023 self.update_window_sizes();
10241024 }
10251025
1026- fn contains(&self, window: &W) -> bool {
1026+ pub fn contains(&self, window: &W) -> bool {
10271027 self.windows.iter().any(|win| win == window)
10281028 }
10291029