From 20aa8ee67dc528299dbc8735220a1c081c7ff9f6 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 25 Jan 2019 08:29:21 +1000 Subject: Implement fullscreen global --- sway/input/seat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sway/input/seat.c') diff --git a/sway/input/seat.c b/sway/input/seat.c index fd5eda2d..f216810b 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -753,6 +753,18 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) { return; } } + // Deny setting focus to a workspace node when using fullscreen global + if (root->fullscreen_global && !container && new_workspace) { + return; + } + // Deny setting focus to a view which is hidden by a fullscreen global + if (root->fullscreen_global && container != root->fullscreen_global && + !container_has_ancestor(container, root->fullscreen_global)) { + // Unless it's a transient container + if (!container_is_transient_for(container, root->fullscreen_global)) { + return; + } + } struct sway_output *new_output = new_workspace->output; -- cgit v1.2.3