]> git.sur5r.net Git - i3/i3/blobdiff - src/scratchpad.c
Merge pull request #1613 from Airblader/feature-1426
[i3/i3] / src / scratchpad.c
index 3b7c2a72b009131e616cd57cf0665af3499c46bc..75b8e56c2bbbfe6064189e563eccc72ebee7acba 100644 (file)
@@ -198,10 +198,7 @@ void scratchpad_show(Con *con) {
         con->rect.width = output->rect.width * 0.5;
         con->rect.height = output->rect.height * 0.75;
         floating_check_size(con);
-        con->rect.x = output->rect.x +
-                      ((output->rect.width / 2.0) - (con->rect.width / 2.0));
-        con->rect.y = output->rect.y +
-                      ((output->rect.height / 2.0) - (con->rect.height / 2.0));
+        floating_center(con, con_get_workspace(con)->rect);
     }
 
     /* Activate active workspace if window is from another workspace to ensure