Initialize workspace rect to the output's upon creation

The comment immediately following implied that this was the intended
behaviour. Not doing so means that compound commands that both move a
window to a new workspace as well as do something that depends on the
workspace's geometry (e.g. 'move position center' or 'floating enable'
on a tiled window) would use the workspace's calloc'd 0x0+0x0 geometry.
This commit is contained in:
Deiz
2015-04-26 14:23:08 -04:00
parent a4f0ed62e5
commit f0f906a52e
2 changed files with 54 additions and 0 deletions

View File

@ -29,6 +29,7 @@ static void _workspace_apply_default_orientation(Con *ws) {
if (config.default_orientation == NO_ORIENTATION) {
Con *output = con_get_output(ws);
ws->layout = (output->rect.height > output->rect.width) ? L_SPLITV : L_SPLITH;
ws->rect = output->rect;
DLOG("Auto orientation. Workspace size set to (%d,%d), setting layout to %d.\n",
output->rect.width, output->rect.height, ws->layout);
} else {