mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
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.
This commit is contained in:
parent
eea9c6331f
commit
c6e7cf1ae5
4 changed files with 38 additions and 15 deletions
|
|
@ -377,6 +377,13 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
|
|||
if (container_is_scratchpad_hidden_or_child(container)) {
|
||||
root_scratchpad_show(container);
|
||||
}
|
||||
// if we are switching to a container under a fullscreen window, we first
|
||||
// need to exit fullscreen so that the newly focused container becomes visible
|
||||
struct sway_container *obstructing = container_obstructing_fullscreen_container(container);
|
||||
if (obstructing) {
|
||||
container_fullscreen_disable(obstructing);
|
||||
arrange_root();
|
||||
}
|
||||
seat_set_focus_container(seat, container);
|
||||
seat_consider_warp_to_focus(seat);
|
||||
container_raise_floating(container);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue