set I3_PID atom on the root window

next
Michael Stapelberg 2012-08-12 13:51:47 +02:00
parent b01d45e027
commit 394b395455
2 changed files with 3 additions and 0 deletions

View File

@ -27,3 +27,4 @@ xmacro(I3_SOCKET_PATH)
xmacro(I3_CONFIG_PATH)
xmacro(I3_SYNC)
xmacro(I3_SHMLOG_PATH)
xmacro(I3_PID)

View File

@ -1030,9 +1030,11 @@ void x_set_name(Con *con, const char *name) {
*
*/
void x_set_i3_atoms(void) {
pid_t pid = getpid();
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_SOCKET_PATH, A_UTF8_STRING, 8,
(current_socketpath == NULL ? 0 : strlen(current_socketpath)),
current_socketpath);
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,