]> git.sur5r.net Git - i3/i3/commitdiff
set original window title on placeholder windows
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 15 Dec 2013 10:32:36 +0000 (11:32 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 22 Dec 2013 20:52:49 +0000 (21:52 +0100)
src/restore_layout.c

index e52f1567a3f191e87dc3a539199dc4e092528686..1a7dfaf88111a59ecaee5f9d45ffebdc93924d50 100644 (file)
@@ -172,7 +172,11 @@ static void open_placeholder_window(Con *con) {
                     root_screen->white_pixel,
                     XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY,
                 });
-        // TODO: set window title from con->name
+        /* Set the same name as was stored in the layout file. While perhaps
+         * slightly confusing in the first instant, this brings additional
+         * clarity to which placeholder is waiting for which actual window. */
+        xcb_change_property(restore_conn, XCB_PROP_MODE_REPLACE, placeholder,
+                            A__NET_WM_NAME, A_UTF8_STRING, 8, strlen(con->name), con->name);
         DLOG("Created placeholder window 0x%08x for leaf container %p / %s\n",
              placeholder, con, con->name);