summaryrefslogtreecommitdiff
path: root/sway/container.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2015-08-19 07:14:03 -0400
committerDrew DeVault <[email protected]>2015-08-19 07:14:03 -0400
commit8fb2e7e34e279a005a4d42e224f71f9b35ddf918 (patch)
treea04cc657974f755360c5102a88c908a5160f61cd /sway/container.c
parentae367c5af496828cf326f55597db26fcbfefe6d0 (diff)
parentc5a69828934bf07db9062bd5f24bb2ff94b45b4a (diff)
Merge pull request #79 from taiyu-len/master
fixed floating_modifier related things
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c6
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;