diff options
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/container.c b/sway/container.c index ec4d48b8..0a89f634 100644 --- a/sway/container.c +++ b/sway/container.c @@ -200,8 +200,9 @@ swayc_t *new_floating_view(wlc_handle handle) { // Set the geometry of the floating view const struct wlc_geometry* geometry = wlc_view_get_geometry(handle); - view->x = geometry->origin.x; - view->y = geometry->origin.y; + //give it requested geometry, but place in center + view->x = (active_workspace->width - geometry->size.w) / 2; + view->y = (active_workspace->height- geometry->size.h) / 2; view->width = geometry->size.w; view->height = geometry->size.h; @@ -260,7 +261,6 @@ swayc_t *destroy_container(swayc_t *container) { sway_log(L_DEBUG, "Container: Destroying container '%p'", container); swayc_t *parent = container->parent; free_swayc(container); - container = parent; } return container; |