/* We explicitly set a background color and border color (even though we
* don’t even have a border) because the X11 server requires us to when
* using 32 bit color depths, see
- * http://stackoverflow.com/questions/3645632 */
+ * https://stackoverflow.com/questions/3645632 */
mask |= XCB_CW_BACK_PIXEL;
values[0] = root_screen->black_pixel;
*
*/
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);
+ }
}
/*