From 1a05121498a059efd1e6b706533e225ac7ad1636 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Mon, 13 Feb 2023 20:35:11 +0100 Subject: [PATCH] input: special case Focus/Move actions for fullscreen windows --- src/input/mod.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/input/mod.rs b/src/input/mod.rs index 8555df80..c87e135b 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -822,10 +822,14 @@ impl State { let current_output = seat.active_output(); let workspace = self.common.shell.active_space_mut(¤t_output); let focus_stack = workspace.focus_stack.get(seat); - match workspace + let mut result = workspace .tiling_layer - .next_focus(focus, seat, focus_stack.iter()) - { + .next_focus(focus, seat, focus_stack.iter()); + if workspace.get_fullscreen(¤t_output).is_some() { + result = FocusResult::None; + } + + match result { FocusResult::None => { // TODO: Handle Workspace orientation match focus { @@ -854,6 +858,10 @@ impl State { Action::Move(direction) => { let current_output = seat.active_output(); let workspace = self.common.shell.active_space_mut(¤t_output); + if workspace.get_fullscreen(¤t_output).is_some() { + return; // TODO, is this what we want? How do we indicate the switch? + } + if let Some(_move_further) = workspace.tiling_layer.move_current_window(direction, seat) {