rules: fix assertion failure
If a view that is currently being destroyed is matched by a newly added rule river crashes due to an assertion failure. Fix this and add another assertion to make this precondition more visible to the users of RuleList.match().
This commit is contained in:
@ -183,6 +183,8 @@ pub fn ruleDel(_: *Seat, args: []const [:0]const u8, _: *?[]const u8) Error!void
|
||||
fn apply_ssd_rules() void {
|
||||
var it = server.root.views.iterator(.forward);
|
||||
while (it.next()) |view| {
|
||||
if (view.destroying) continue;
|
||||
|
||||
if (server.config.rules.ssd.match(view)) |ssd| {
|
||||
view.pending.ssd = ssd;
|
||||
}
|
||||
|
Reference in New Issue
Block a user