X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcommands.c;h=9830478f7eeaa94ad97d761cce0727b65bd3e95f;hb=4622cde7b785b522b29d66c7d9bdcc9aa1eeb452;hp=964dfe29cd5be6e74f2e604f541564b524d4cd3e;hpb=8a1c8115cad58586527b8461118917dc25653cd4;p=i3%2Fi3 diff --git a/src/commands.c b/src/commands.c index 964dfe29..9830478f 100644 --- a/src/commands.c +++ b/src/commands.c @@ -1,3 +1,5 @@ +#undef I3__FILE__ +#define I3__FILE__ "commands.c" /* * vim:ts=4:sw=4:expandtab * @@ -414,8 +416,14 @@ void cmd_move_con_to_workspace_name(I3_CMD, char *name) { /* We have nothing to move: * when criteria was specified but didn't match any window or * when criteria wasn't specified and we don't have any window focused. */ - if ((!match_is_empty(current_match) && TAILQ_EMPTY(&owindows)) || - (match_is_empty(current_match) && focused->type == CT_WORKSPACE)) { + if (!match_is_empty(current_match) && TAILQ_EMPTY(&owindows)) { + ELOG("No windows match your criteria, cannot move.\n"); + ysuccess(false); + return; + } + + if (match_is_empty(current_match) && focused->type == CT_WORKSPACE) { + ELOG("No window to move, you have focused a workspace.\n"); ysuccess(false); return; } @@ -505,7 +513,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; @@ -1263,7 +1271,7 @@ void cmd_focus_level(I3_CMD, char *level) { if (con_fullscreen_permits_focusing(focused->parent)) success = level_up(); else - LOG("Currently in fullscreen, not going up\n"); + ELOG("'focus parent': Currently in fullscreen, not going up\n"); } }