aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
authorLibravatar lbonn <bonnans.l@gmail.com>2021-01-20 22:20:00 +0100
committerLibravatar Tudor Brindus <me@tbrindus.ca>2021-02-25 09:40:20 -0500
commitc6e7cf1ae554f36e5120962ace779737827ad088 (patch)
tree6071546edfe33925f7f205414166e62fbfd6d819 /sway/commands/focus.c
parentAutomatically map built-in touchscreens/tablets to built-in panels (diff)
downloadsway-c6e7cf1ae554f36e5120962ace779737827ad088.tar.gz
sway-c6e7cf1ae554f36e5120962ace779737827ad088.tar.zst
sway-c6e7cf1ae554f36e5120962ace779737827ad088.zip
focus: beyond fullscreen when focused explicitly
When issuing a focus command on a specific container, users expect to proceed it even if is hidden by a fullscreen window. This matches the behavior of i3.
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 6b4f57c1..6771ca2f 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -377,6 +377,13 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
377 if (container_is_scratchpad_hidden_or_child(container)) { 377 if (container_is_scratchpad_hidden_or_child(container)) {
378 root_scratchpad_show(container); 378 root_scratchpad_show(container);
379 } 379 }
380 // if we are switching to a container under a fullscreen window, we first
381 // need to exit fullscreen so that the newly focused container becomes visible
382 struct sway_container *obstructing = container_obstructing_fullscreen_container(container);
383 if (obstructing) {
384 container_fullscreen_disable(obstructing);
385 arrange_root();
386 }
380 seat_set_focus_container(seat, container); 387 seat_set_focus_container(seat, container);
381 seat_consider_warp_to_focus(seat); 388 seat_consider_warp_to_focus(seat);
382 container_raise_floating(container); 389 container_raise_floating(container);