commit 0f3132365991c0342835134ff6657c18ebbe1347
parent 17593ac5593c3bf2de824f26060aae90266f38bb
Author: Vasilij Schneidermann <mail@vasilij.de>
Date: Tue, 18 Apr 2017 23:47:09 +0200
Use i3's dimensions for initial scratchpad views
See https://github.com/i3/i3/blob/master/src/scratchpad.c#L196-L197
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sway/commands/scratchpad.c b/sway/commands/scratchpad.c
@@ -16,8 +16,8 @@ static swayc_t *fetch_view_from_scratchpad() {
wlc_view_set_output(view->handle, swayc_active_output()->handle);
}
if (!view->is_floating) {
- view->width = swayc_active_workspace()->width/2;
- view->height = swayc_active_workspace()->height/2;
+ view->width = swayc_active_workspace()->width * 0.5;
+ view->height = swayc_active_workspace()->height * 0.75;
view->x = (swayc_active_workspace()->width - view->width)/2;
view->y = (swayc_active_workspace()->height - view->height)/2;
}