aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/scratchpad.c
diff options
context:
space:
mode:
authorLibravatar Vasilij Schneidermann <mail@vasilij.de>2017-04-18 23:47:09 +0200
committerLibravatar Vasilij Schneidermann <mail@vasilij.de>2017-04-18 23:47:09 +0200
commit0f3132365991c0342835134ff6657c18ebbe1347 (patch)
treedf85d67c79965623cc48ff610dae7eb1fdd12fb3 /sway/commands/scratchpad.c
parentMerge pull request #1180 from wasamasa/feature-move-to-scratchpad (diff)
downloadsway-0f3132365991c0342835134ff6657c18ebbe1347.tar.gz
sway-0f3132365991c0342835134ff6657c18ebbe1347.tar.zst
sway-0f3132365991c0342835134ff6657c18ebbe1347.zip
Use i3's dimensions for initial scratchpad views
See https://github.com/i3/i3/blob/master/src/scratchpad.c#L196-L197
Diffstat (limited to 'sway/commands/scratchpad.c')
-rw-r--r--sway/commands/scratchpad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/commands/scratchpad.c b/sway/commands/scratchpad.c
index d5e888b8..dec32f51 100644
--- a/sway/commands/scratchpad.c
+++ b/sway/commands/scratchpad.c
@@ -16,8 +16,8 @@ static swayc_t *fetch_view_from_scratchpad() {
16 wlc_view_set_output(view->handle, swayc_active_output()->handle); 16 wlc_view_set_output(view->handle, swayc_active_output()->handle);
17 } 17 }
18 if (!view->is_floating) { 18 if (!view->is_floating) {
19 view->width = swayc_active_workspace()->width/2; 19 view->width = swayc_active_workspace()->width * 0.5;
20 view->height = swayc_active_workspace()->height/2; 20 view->height = swayc_active_workspace()->height * 0.75;
21 view->x = (swayc_active_workspace()->width - view->width)/2; 21 view->x = (swayc_active_workspace()->width - view->width)/2;
22 view->y = (swayc_active_workspace()->height - view->height)/2; 22 view->y = (swayc_active_workspace()->height - view->height)/2;
23 } 23 }