aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/root.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-03-29 12:26:08 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-03-31 17:49:05 -0600
commit679c058fac986314675bacf7a7b01d263fb0db39 (patch)
tree1d5ade6a8e4304f18fe6ac5943e3ac6aa68f4136 /sway/tree/root.c
parentfloating: fix size of non-view containers (diff)
downloadsway-679c058fac986314675bacf7a7b01d263fb0db39.tar.gz
sway-679c058fac986314675bacf7a7b01d263fb0db39.tar.zst
sway-679c058fac986314675bacf7a7b01d263fb0db39.zip
scratchpad: set initial size
This matches i3's behavior of setting scratchpad containers to 50% of the workspace's width and 75% of the workspace's height, bound by the minimum and maximum floating width/height.
Diffstat (limited to 'sway/tree/root.c')
-rw-r--r--sway/tree/root.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/tree/root.c b/sway/tree/root.c
index bc9c610d..3d93405e 100644
--- a/sway/tree/root.c
+++ b/sway/tree/root.c
@@ -62,6 +62,8 @@ void root_scratchpad_add_container(struct sway_container *con) {
62 struct sway_container *parent = con->parent; 62 struct sway_container *parent = con->parent;
63 struct sway_workspace *workspace = con->workspace; 63 struct sway_workspace *workspace = con->workspace;
64 container_set_floating(con, true); 64 container_set_floating(con, true);
65 container_floating_set_default_size(con);
66 container_floating_move_to_center(con);
65 container_detach(con); 67 container_detach(con);
66 con->scratchpad = true; 68 con->scratchpad = true;
67 list_add(root->scratchpad, con); 69 list_add(root->scratchpad, con);