From 679c058fac986314675bacf7a7b01d263fb0db39 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Fri, 29 Mar 2019 12:26:08 -0400 Subject: 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. --- sway/tree/root.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sway/tree/root.c') 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) { struct sway_container *parent = con->parent; struct sway_workspace *workspace = con->workspace; container_set_floating(con, true); + container_floating_set_default_size(con); + container_floating_move_to_center(con); container_detach(con); con->scratchpad = true; list_add(root->scratchpad, con); -- cgit v1.2.3