diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-15 20:02:55 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-15 20:02:55 +0200 |
| commit | 414a0764107377fe5e925ebc1f01d563fe7ca977 (patch) | |
| tree | 2a9f73d6f62da8f1daf46be47669cf8241952ec1 /src/seat.zig | |
| parent | 8a326541f6728749dd24b786960dadc2148f0f43 (diff) | |
| download | river-414a0764107377fe5e925ebc1f01d563fe7ca977.tar.gz river-414a0764107377fe5e925ebc1f01d563fe7ca977.tar.xz | |
Fix focus handling on output cycle
Diffstat (limited to 'src/seat.zig')
| -rw-r--r-- | src/seat.zig | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/seat.zig b/src/seat.zig index d694970..dc25802 100644 --- a/src/seat.zig +++ b/src/seat.zig @@ -65,11 +65,16 @@ pub const Seat = struct { v.current_tags & self.focused_output.current_focused_tags == 0 else true) { - // Set view to the first currently visible view in the focus stack if any - view = if (ViewStack(*View).iterator( + // Set view to the first currently visible view on in the focus stack if any + var it = ViewStack(*View).iterator( self.focus_stack.first, self.focused_output.current_focused_tags, - ).next()) |node| node.view else null; + ); + view = while (it.next()) |node| { + if (node.view.output == self.focused_output) { + break node.view; + } + } else null; } if (self.focused_view) |current_focus| { |
