|
|
@ -522,21 +522,11 @@ static struct sway_container *container_at_view(struct sway_container *swayc,
|
|
|
|
view_sx, view_sy, &_sx, &_sy);
|
|
|
|
view_sx, view_sy, &_sx, &_sy);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SWAY_VIEW_XDG_SHELL_V6:
|
|
|
|
case SWAY_VIEW_XDG_SHELL_V6:
|
|
|
|
// the top left corner of the sway container is the
|
|
|
|
|
|
|
|
// coordinate of the top left corner of the window geometry
|
|
|
|
|
|
|
|
view_sx += sview->wlr_xdg_surface_v6->geometry.x;
|
|
|
|
|
|
|
|
view_sy += sview->wlr_xdg_surface_v6->geometry.y;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_surface = wlr_xdg_surface_v6_surface_at(
|
|
|
|
_surface = wlr_xdg_surface_v6_surface_at(
|
|
|
|
sview->wlr_xdg_surface_v6,
|
|
|
|
sview->wlr_xdg_surface_v6,
|
|
|
|
view_sx, view_sy, &_sx, &_sy);
|
|
|
|
view_sx, view_sy, &_sx, &_sy);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SWAY_VIEW_XDG_SHELL:
|
|
|
|
case SWAY_VIEW_XDG_SHELL:
|
|
|
|
// the top left corner of the sway container is the
|
|
|
|
|
|
|
|
// coordinate of the top left corner of the window geometry
|
|
|
|
|
|
|
|
view_sx += sview->wlr_xdg_surface->geometry.x;
|
|
|
|
|
|
|
|
view_sy += sview->wlr_xdg_surface->geometry.y;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_surface = wlr_xdg_surface_surface_at(
|
|
|
|
_surface = wlr_xdg_surface_surface_at(
|
|
|
|
sview->wlr_xdg_surface,
|
|
|
|
sview->wlr_xdg_surface,
|
|
|
|
view_sx, view_sy, &_sx, &_sy);
|
|
|
|
view_sx, view_sy, &_sx, &_sy);
|
|
|
@ -954,6 +944,9 @@ void container_set_floating(struct sway_container *container, bool enable) {
|
|
|
|
container_add_child(workspace, container);
|
|
|
|
container_add_child(workspace, container);
|
|
|
|
container->width = container->parent->width;
|
|
|
|
container->width = container->parent->width;
|
|
|
|
container->height = container->parent->height;
|
|
|
|
container->height = container->parent->height;
|
|
|
|
|
|
|
|
if (container->type == C_VIEW) {
|
|
|
|
|
|
|
|
view_set_tiled(container->sway_view, true);
|
|
|
|
|
|
|
|
}
|
|
|
|
container->is_sticky = false;
|
|
|
|
container->is_sticky = false;
|
|
|
|
container_reap_empty_recursive(workspace->sway_workspace->floating);
|
|
|
|
container_reap_empty_recursive(workspace->sway_workspace->floating);
|
|
|
|
}
|
|
|
|
}
|
|
|
|