]> git.sur5r.net Git - i3/i3/blobdiff - src/workspace.c
Workspace renaming: Interpret outputs as nondirectional
[i3/i3] / src / workspace.c
index 643b78dd49c634341290843f4fe4cc5954bd6d45..a16479a5409fd40374d87b8cf62cbe6d48970526 100644 (file)
@@ -923,8 +923,8 @@ Con *workspace_encapsulate(Con *ws) {
  * Move the given workspace to the specified output.
  * This returns true if and only if moving the workspace was successful.
  */
-bool workspace_move_to_output(Con *ws, const char *name) {
-    LOG("Trying to move workspace %p / %s to output \"%s\".\n", ws, ws->name, name);
+bool workspace_move_to_output(Con *ws, Output *output) {
+    LOG("Trying to move workspace %p / %s to output %p / \"%s\".\n", ws, ws->name, output, output_primary_name(output));
 
     Output *current_output = get_output_for_con(ws);
     if (current_output == NULL) {
@@ -932,12 +932,6 @@ bool workspace_move_to_output(Con *ws, const char *name) {
         return false;
     }
 
-    Output *output = get_output_from_string(current_output, name);
-    if (!output) {
-        ELOG("Could not get output from string \"%s\"\n", name);
-        return false;
-    }
-
     Con *content = output_get_content(output->con);
     LOG("got output %p with content %p\n", output, content);