git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit4c48bff1fb93c4e47f4fa8c9e4a08bb1d54509ee
parentf35a727e6c
authorIsaac Freund <[email protected]>
date2024-03-09 13:47
View: remove faulty assertion

This assertion does not consider that a view may be visible on an output
despite no view on that output having focus due to a differnt output
currently having focus.

I don't see any clean way to fix the assert, so just remove it.

 river/View.zig | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/river/View.zig b/river/View.zig
index 1927830..ed7441a 100644
--- a/river/View.zig
+++ b/river/View.zig
@@ -573,10 +573,6 @@ pub fn attachRelative(view: *Self, output_pending: *Output.PendingState, mode: A
     // 2. There are no views visible given the currently focused tags. In this case it
     // doesn't matter where in the wm_stack the new view is inserted as it will be the only
     // view visible.
-    //
-    // Assert that exactly one of these cases is true
-    assert((focus_stack_head.pending.tags & output_pending.tags != 0) !=
-        (focus_stack_head.pending.focus == 0));
 
     var it = output_pending.wm_stack.iterator(.forward);
     while (it.next()) |other| {