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) { | |||
200 | // Set the geometry of the floating view | 200 | // Set the geometry of the floating view |
201 | const struct wlc_geometry* geometry = wlc_view_get_geometry(handle); | 201 | const struct wlc_geometry* geometry = wlc_view_get_geometry(handle); |
202 | 202 | ||
203 | view->x = geometry->origin.x; | 203 | //give it requested geometry, but place in center |
204 | view->y = geometry->origin.y; | 204 | view->x = (active_workspace->width - geometry->size.w) / 2; |
205 | view->y = (active_workspace->height- geometry->size.h) / 2; | ||
205 | view->width = geometry->size.w; | 206 | view->width = geometry->size.w; |
206 | view->height = geometry->size.h; | 207 | view->height = geometry->size.h; |
207 | 208 | ||
@@ -260,7 +261,6 @@ swayc_t *destroy_container(swayc_t *container) { | |||
260 | sway_log(L_DEBUG, "Container: Destroying container '%p'", container); | 261 | sway_log(L_DEBUG, "Container: Destroying container '%p'", container); |
261 | swayc_t *parent = container->parent; | 262 | swayc_t *parent = container->parent; |
262 | free_swayc(container); | 263 | free_swayc(container); |
263 | |||
264 | container = parent; | 264 | container = parent; |
265 | } | 265 | } |
266 | return container; | 266 | return container; |