Handle floating centering in one function and test for consistency

This commit is contained in:
Deiz
2015-03-30 03:10:40 -04:00
parent 2759a308a2
commit c6581a5fd6
5 changed files with 128 additions and 20 deletions

View 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