]> git.sur5r.net Git - i3/i3/blobdiff - src/floating.c
Implement setting the WM_NAME of i3 container windows for debugging
[i3/i3] / src / floating.c
index ea39f507ef7d51d95e2384c87235b41d0c555b49..756102b7afe67fef59660087ad4a7eb6c7462d00 100644 (file)
@@ -32,7 +32,16 @@ void floating_enable(Con *con, bool automatic) {
     /* 2: create a new container to render the decoration on, add
      * it as a floating window to the workspace */
     Con *nc = con_new(NULL);
+    /* we need to set the parent afterwards instead of passing it as an
+     * argument to con_new() because nc would be inserted into the tiling layer
+     * otherwise. */
     nc->parent = con_get_workspace(con);
+
+    char *name;
+    asprintf(&name, "[i3 con] floatingcon around %p", con);
+    x_set_name(nc, name);
+    free(name);
+
     nc->rect = con->rect;
     /* add pixels for the decoration */
     /* TODO: don’t add them when the user automatically puts new windows into