command: disable focus-view in fullscreen

This commit is contained in:
Isaac Freund 2020-06-28 23:15:30 +02:00
parent 3cbd95fadc
commit acd08840ab
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -38,6 +38,9 @@ pub fn focusView(
const output = seat.focused_output; const output = seat.focused_output;
if (seat.focused_view) |current_focus| { if (seat.focused_view) |current_focus| {
// If the focused view is fullscreen, do nothing
if (current_focus.current.fullscreen) return;
// If there is a currently focused view, focus the next visible view in the stack. // If there is a currently focused view, focus the next visible view in the stack.
const focused_node = @fieldParentPtr(ViewStack(View).Node, "view", current_focus); const focused_node = @fieldParentPtr(ViewStack(View).Node, "view", current_focus);
var it = switch (direction) { var it = switch (direction) {