diff options
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index ab3d9dbd..6f6137c4 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -522,21 +522,11 @@ static struct sway_container *container_at_view(struct sway_container *swayc, | |||
522 | view_sx, view_sy, &_sx, &_sy); | 522 | view_sx, view_sy, &_sx, &_sy); |
523 | break; | 523 | break; |
524 | case SWAY_VIEW_XDG_SHELL_V6: | 524 | case SWAY_VIEW_XDG_SHELL_V6: |
525 | // the top left corner of the sway container is the | ||
526 | // coordinate of the top left corner of the window geometry | ||
527 | view_sx += sview->wlr_xdg_surface_v6->geometry.x; | ||
528 | view_sy += sview->wlr_xdg_surface_v6->geometry.y; | ||
529 | |||
530 | _surface = wlr_xdg_surface_v6_surface_at( | 525 | _surface = wlr_xdg_surface_v6_surface_at( |
531 | sview->wlr_xdg_surface_v6, | 526 | sview->wlr_xdg_surface_v6, |
532 | view_sx, view_sy, &_sx, &_sy); | 527 | view_sx, view_sy, &_sx, &_sy); |
533 | break; | 528 | break; |
534 | case SWAY_VIEW_XDG_SHELL: | 529 | case SWAY_VIEW_XDG_SHELL: |
535 | // the top left corner of the sway container is the | ||
536 | // coordinate of the top left corner of the window geometry | ||
537 | view_sx += sview->wlr_xdg_surface->geometry.x; | ||
538 | view_sy += sview->wlr_xdg_surface->geometry.y; | ||
539 | |||
540 | _surface = wlr_xdg_surface_surface_at( | 530 | _surface = wlr_xdg_surface_surface_at( |
541 | sview->wlr_xdg_surface, | 531 | sview->wlr_xdg_surface, |
542 | view_sx, view_sy, &_sx, &_sy); | 532 | view_sx, view_sy, &_sx, &_sy); |
@@ -954,6 +944,9 @@ void container_set_floating(struct sway_container *container, bool enable) { | |||
954 | container_add_child(workspace, container); | 944 | container_add_child(workspace, container); |
955 | container->width = container->parent->width; | 945 | container->width = container->parent->width; |
956 | container->height = container->parent->height; | 946 | container->height = container->parent->height; |
947 | if (container->type == C_VIEW) { | ||
948 | view_set_tiled(container->sway_view, true); | ||
949 | } | ||
957 | container->is_sticky = false; | 950 | container->is_sticky = false; |
958 | container_reap_empty_recursive(workspace->sway_workspace->floating); | 951 | container_reap_empty_recursive(workspace->sway_workspace->floating); |
959 | } | 952 | } |