cmd_move_window_to_position: improve error message

This commit is contained in:
Orestis Floros
2018-03-18 02:41:12 +02:00
parent 174dc389ff
commit 5e8a3f3f0c
3 changed files with 8 additions and 5 deletions

View File

@ -1718,10 +1718,12 @@ void cmd_move_window_to_position(I3_CMD, long x, long y) {
newrect.x = x;
newrect.y = y;
floating_reposition(current->con->parent, newrect);
if (!floating_reposition(current->con->parent, newrect)) {
yerror("Cannot move window/container out of bounds.");
has_error = true;
}
}
// XXX: default reply for now, make this a better reply
if (!has_error)
ysuccess(true);
}