mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-31 06:23:13 +02:00
fix(wm): sort layout and behaviour rules
This commit makes sure the `layout-rules` and `window_container_behaviour_rules` are sorted when setting them from the config. So that the behaviour on workspace update is correct.
This commit is contained in:
@@ -167,6 +167,7 @@ impl Workspace {
|
||||
all_layout_rules.push((*count, Layout::Default(*rule)));
|
||||
}
|
||||
|
||||
all_layout_rules.sort_by_key(|(i, _)| *i);
|
||||
self.tile = true;
|
||||
}
|
||||
|
||||
@@ -178,6 +179,7 @@ impl Workspace {
|
||||
all_layout_rules.push((*count, Layout::Custom(rule)));
|
||||
}
|
||||
|
||||
all_layout_rules.sort_by_key(|(i, _)| *i);
|
||||
self.tile = true;
|
||||
self.set_layout_rules(all_layout_rules);
|
||||
}
|
||||
@@ -197,11 +199,11 @@ impl Workspace {
|
||||
all_rules.push((*count, *behaviour));
|
||||
}
|
||||
|
||||
all_rules.sort_by_key(|(i, _)| *i);
|
||||
self.set_window_container_behaviour_rules(Some(all_rules));
|
||||
}
|
||||
} else {
|
||||
self.set_window_container_behaviour_rules(None);
|
||||
self.set_window_container_behaviour(None);
|
||||
}
|
||||
|
||||
self.set_float_override(config.float_override);
|
||||
|
||||
Reference in New Issue
Block a user