Fix broken crashy behavior of zoom
This commit is contained in:
parent
14ffe91a52
commit
85f38c06d0
@ -29,8 +29,9 @@ pub fn zoom(seat: *Seat, arg: Arg) void {
|
|||||||
const output = seat.focused_output;
|
const output = seat.focused_output;
|
||||||
const focused_node = @fieldParentPtr(ViewStack(View).Node, "view", current_focus);
|
const focused_node = @fieldParentPtr(ViewStack(View).Node, "view", current_focus);
|
||||||
|
|
||||||
const zoom_node = if (focused_node == output.views.first)
|
var it = ViewStack(View).iterator(output.views.first, output.current_focused_tags);
|
||||||
if (focused_node.next) |second| second else null
|
const zoom_node = if (focused_node == it.next())
|
||||||
|
if (it.next()) |second| second else null
|
||||||
else
|
else
|
||||||
focused_node;
|
focused_node;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user