aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index d23525a8..2d714acd 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1139,26 +1139,15 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) {
1139 struct sway_container *container = node->type == N_CONTAINER ? 1139 struct sway_container *container = node->type == N_CONTAINER ?
1140 node->sway_container : NULL; 1140 node->sway_container : NULL;
1141 1141
1142 // Deny setting focus to a view which is hidden by a fullscreen container 1142 // Deny setting focus to a view which is hidden by a fullscreen container or global
1143 if (new_workspace && new_workspace->fullscreen && container && 1143 if (container && container_obstructing_fullscreen_container(container)) {
1144 !container_is_fullscreen_or_child(container)) { 1144 return;
1145 // Unless it's a transient container
1146 if (!container_is_transient_for(container, new_workspace->fullscreen)) {
1147 return;
1148 }
1149 } 1145 }
1146
1150 // Deny setting focus to a workspace node when using fullscreen global 1147 // Deny setting focus to a workspace node when using fullscreen global
1151 if (root->fullscreen_global && !container && new_workspace) { 1148 if (root->fullscreen_global && !container && new_workspace) {
1152 return; 1149 return;
1153 } 1150 }
1154 // Deny setting focus to a view which is hidden by a fullscreen global
1155 if (root->fullscreen_global && container != root->fullscreen_global &&
1156 !container_has_ancestor(container, root->fullscreen_global)) {
1157 // Unless it's a transient container
1158 if (!container_is_transient_for(container, root->fullscreen_global)) {
1159 return;
1160 }
1161 }
1162 1151
1163 struct sway_output *new_output = 1152 struct sway_output *new_output =
1164 new_workspace ? new_workspace->output : NULL; 1153 new_workspace ? new_workspace->output : NULL;