aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-08-27 12:41:39 -0400
committerLibravatar GitHub <noreply@github.com>2018-08-27 12:41:39 -0400
commit82423b88b8c3d6a34e883a840db1bfe2fefc9932 (patch)
tree060b5d59ce74c00eb522beb38ff60e4bcb3ad3f9 /sway
parentMerge pull request #2520 from RedSoxFan/destroy-empty-ws-on-evac (diff)
parentAllow subsurfaces which overflow the container to be interacted with (diff)
downloadsway-82423b88b8c3d6a34e883a840db1bfe2fefc9932.tar.gz
sway-82423b88b8c3d6a34e883a840db1bfe2fefc9932.tar.zst
sway-82423b88b8c3d6a34e883a840db1bfe2fefc9932.zip
Merge pull request #2494 from RyanDwyer/fix-overflowing-subsurfaces
Allow subsurfaces which overflow the container to be interacted with
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/container.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 58fd4898..04454ab6 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -476,10 +476,11 @@ struct sway_container *container_at(struct sway_container *workspace,
476 return NULL; 476 return NULL;
477 } 477 }
478 struct sway_container *c; 478 struct sway_container *c;
479 // Focused view's popups
480 struct sway_seat *seat = input_manager_current_seat(input_manager); 479 struct sway_seat *seat = input_manager_current_seat(input_manager);
481 struct sway_container *focus = 480 struct sway_container *focus =
482 seat_get_focus_inactive(seat, &root_container); 481 seat_get_focus_inactive(seat, &root_container);
482 bool is_floating = focus && container_is_floating_or_child(focus);
483 // Focused view's popups
483 if (focus && focus->type == C_VIEW) { 484 if (focus && focus->type == C_VIEW) {
484 surface_at_view(focus, lx, ly, surface, sx, sy); 485 surface_at_view(focus, lx, ly, surface, sx, sy);
485 if (*surface && surface_is_popup(*surface)) { 486 if (*surface && surface_is_popup(*surface)) {
@@ -487,11 +488,27 @@ struct sway_container *container_at(struct sway_container *workspace,
487 } 488 }
488 *surface = NULL; 489 *surface = NULL;
489 } 490 }
490 // Floating 491 // If focused is floating, focused view's non-popups
492 if (focus && focus->type == C_VIEW && is_floating) {
493 surface_at_view(focus, lx, ly, surface, sx, sy);
494 if (*surface) {
495 return focus;
496 }
497 *surface = NULL;
498 }
499 // Floating (non-focused)
491 if ((c = floating_container_at(lx, ly, surface, sx, sy))) { 500 if ((c = floating_container_at(lx, ly, surface, sx, sy))) {
492 return c; 501 return c;
493 } 502 }
494 // Tiling 503 // If focused is tiling, focused view's non-popups
504 if (focus && focus->type == C_VIEW && !is_floating) {
505 surface_at_view(focus, lx, ly, surface, sx, sy);
506 if (*surface) {
507 return focus;
508 }
509 *surface = NULL;
510 }
511 // Tiling (non-focused)
495 if ((c = tiling_container_at(workspace, lx, ly, surface, sx, sy))) { 512 if ((c = tiling_container_at(workspace, lx, ly, surface, sx, sy))) {
496 return c; 513 return c;
497 } 514 }