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.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index af55a54e..2de0c7a8 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -507,21 +507,11 @@ static struct sway_container *container_at_view(struct sway_container *swayc,
507 view_sx, view_sy, &_sx, &_sy); 507 view_sx, view_sy, &_sx, &_sy);
508 break; 508 break;
509 case SWAY_VIEW_XDG_SHELL_V6: 509 case SWAY_VIEW_XDG_SHELL_V6:
510 // the top left corner of the sway container is the
511 // coordinate of the top left corner of the window geometry
512 view_sx += sview->wlr_xdg_surface_v6->geometry.x;
513 view_sy += sview->wlr_xdg_surface_v6->geometry.y;
514
515 _surface = wlr_xdg_surface_v6_surface_at( 510 _surface = wlr_xdg_surface_v6_surface_at(
516 sview->wlr_xdg_surface_v6, 511 sview->wlr_xdg_surface_v6,
517 view_sx, view_sy, &_sx, &_sy); 512 view_sx, view_sy, &_sx, &_sy);
518 break; 513 break;
519 case SWAY_VIEW_XDG_SHELL: 514 case SWAY_VIEW_XDG_SHELL:
520 // the top left corner of the sway container is the
521 // coordinate of the top left corner of the window geometry
522 view_sx += sview->wlr_xdg_surface->geometry.x;
523 view_sy += sview->wlr_xdg_surface->geometry.y;
524
525 _surface = wlr_xdg_surface_surface_at( 515 _surface = wlr_xdg_surface_surface_at(
526 sview->wlr_xdg_surface, 516 sview->wlr_xdg_surface,
527 view_sx, view_sy, &_sx, &_sy); 517 view_sx, view_sy, &_sx, &_sy);
@@ -943,6 +933,9 @@ void container_set_floating(struct sway_container *container, bool enable) {
943 container_add_child(workspace, container); 933 container_add_child(workspace, container);
944 container->width = container->parent->width; 934 container->width = container->parent->width;
945 container->height = container->parent->height; 935 container->height = container->parent->height;
936 if (container->type == C_VIEW) {
937 view_set_tiled(container->sway_view, true);
938 }
946 container->is_sticky = false; 939 container->is_sticky = false;
947 container_reap_empty_recursive(workspace->sway_workspace->floating); 940 container_reap_empty_recursive(workspace->sway_workspace->floating);
948 } 941 }