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

commit84b1bc7203a9f37a649bf1ab777f7c515d81ad92
parent2c9a36bad1
authorIsaac Freund <[email protected]>
date2024-02-19 23:21
Root: trival code cleanup in deactivateOutput()

 river/Root.zig | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/river/Root.zig b/river/Root.zig
index bb89239..5743d30 100644
--- a/river/Root.zig
+++ b/river/Root.zig
@@ -286,9 +286,7 @@ pub fn deactivateOutput(root: *Self, output: *Output) void {
     // is being removed, store the views in Root.fallback_pending.
     const fallback_output = blk: {
         var it = root.active_outputs.iterator(.forward);
-        if (it.next()) |o| break :blk o;
-
-        break :blk null;
+        break :blk it.next();
     };
     if (fallback_output) |fallback| {
         var it = output.pending.focus_stack.safeIterator(.reverse);