aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index a069b177..f9ddf3d6 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -369,6 +369,13 @@ struct sway_container *container_at(struct sway_workspace *workspace,
369 } 369 }
370 // If focused is floating, focused view's non-popups 370 // If focused is floating, focused view's non-popups
371 if (focus && focus->view && is_floating) { 371 if (focus && focus->view && is_floating) {
372 // only switch to unfocused container if focused container has no menus open
373 bool has_subsurfaces = wl_list_length(&focus->view->surface->subsurfaces) > 0;
374 c = floating_container_at(lx, ly, surface, sx, sy);
375 if (!has_subsurfaces && c && c->view && *surface && c != focus) {
376 return c;
377 }
378
372 surface_at_view(focus, lx, ly, surface, sx, sy); 379 surface_at_view(focus, lx, ly, surface, sx, sy);
373 if (*surface) { 380 if (*surface) {
374 return focus; 381 return focus;