From: Michael Stapelberg Date: Sun, 26 Nov 2017 17:07:13 +0000 (+0100) Subject: shmlog: remote atom when disabled X-Git-Tag: 4.15~39^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=02b237b14dffd42bbafca34a5acaff8ebff88141;p=i3%2Fi3 shmlog: remote atom when disabled --- diff --git a/src/x.c b/src/x.c index 09a60493..7829079b 100644 --- a/src/x.c +++ b/src/x.c @@ -1227,9 +1227,13 @@ void x_set_name(Con *con, const char *name) { * */ void update_shmlog_atom() { - xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, - A_I3_SHMLOG_PATH, A_UTF8_STRING, 8, - strlen(shmlogname), shmlogname); + if (*shmlogname == '\0') { + xcb_delete_property(conn, root, A_I3_SHMLOG_PATH); + } else { + xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, + A_I3_SHMLOG_PATH, A_UTF8_STRING, 8, + strlen(shmlogname), shmlogname); + } } /*