]> git.sur5r.net Git - i3/i3/blobdiff - src/x.c
Implement shmlog command
[i3/i3] / src / x.c
diff --git a/src/x.c b/src/x.c
index f86559460ed213722fa70bbc1714d0e04636e13a..27d92acad13687499c207414ac0b15f7c2fb99d3 100644 (file)
--- a/src/x.c
+++ b/src/x.c
@@ -1063,6 +1063,16 @@ void x_set_name(Con *con, const char *name) {
     state->name = sstrdup(name);
 }
 
+/*
+ * Set up the I3_SHMLOG_PATH atom.
+ *
+ */
+void update_shmlog_atom() {
+    xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root,
+            A_I3_SHMLOG_PATH, A_UTF8_STRING, 8,
+            strlen(shmlogname), shmlogname);
+}
+
 /*
  * Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
  *
@@ -1075,8 +1085,7 @@ void x_set_i3_atoms(void) {
     xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_PID, XCB_ATOM_CARDINAL, 32, 1, &pid);
     xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_CONFIG_PATH, A_UTF8_STRING, 8,
                         strlen(current_configpath), current_configpath);
-    xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_SHMLOG_PATH, A_UTF8_STRING, 8,
-                        strlen(shmlogname), shmlogname);
+    update_shmlog_atom();
 }
 
 /*