diff options
| author | Isaac Freund <mail@isaacfreund.com> | 2023-03-06 20:17:59 +0100 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2023-03-06 20:17:59 +0100 |
| commit | 29976e5741c4e41bca2e5971731e75c1151a0727 (patch) | |
| tree | 5c3b657b068e85daa2ea7394c1f8242a095705c3 | |
| parent | 684f26acac6ce89498b5ed0dcdd71e7c262d9297 (diff) | |
| download | river-29976e5741c4e41bca2e5971731e75c1151a0727.tar.gz river-29976e5741c4e41bca2e5971731e75c1151a0727.tar.xz | |
Seat: fix potential assertion failure
| -rw-r--r-- | river/Seat.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/river/Seat.zig b/river/Seat.zig index 685d4cc..5b5075f 100644 --- a/river/Seat.zig +++ b/river/Seat.zig @@ -160,7 +160,9 @@ pub fn focus(self: *Self, _target: ?*View) void { } if (target) |view| { - if (view.pending.tags & view.pending.output.?.pending.tags == 0) { + if (view.pending.output == null or + view.pending.tags & view.pending.output.?.pending.tags == 0) + { // If the view is not currently visible, behave as if null was passed target = null; } else if (view.pending.output.? != self.focused_output.?) { |
