fix resizing floating windows by height

When resizing floating windows, changing the height was not correctly
handled. This commit fixes that and adds testcases for shrinking and
growing the width and height of floating windows.
This commit is contained in:
Joel Stemmer
2012-08-18 15:25:00 +02:00
committed by Michael Stapelberg
parent c5cfe22511
commit 1089b0b201
2 changed files with 45 additions and 1 deletions

View File

@ -490,7 +490,7 @@ static void cmd_resize_floating(I3_CMD, char *way, char *direction, Con *floatin
if (strcmp(direction, "up") == 0) {
floating_con->rect.y -= px;
floating_con->rect.height += px;
} else if (strcmp(direction, "down") == 0) {
} else if (strcmp(direction, "down") == 0 || strcmp(direction, "height") == 0) {
floating_con->rect.height += px;
} else if (strcmp(direction, "left") == 0) {
floating_con->rect.x -= px;