]> git.sur5r.net Git - i3/i3/commitdiff
implement error messages when moving to another ws fails (Thanks eeemsi)
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 12 Aug 2012 23:57:39 +0000 (01:57 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 12 Aug 2012 23:57:39 +0000 (01:57 +0200)
fixes #769

src/commands.c

index 02d602f0e5112219bae0356bf0a7d92388c85f0e..728a1d6cae30918fdff32b4a26eacbde639cab0c 100644 (file)
@@ -416,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;
     }