Handle saved_configpath in get_config_path, fix memleak in current_configpath handling, update atoms after reloading (Thanks fernandotcl)
This commit is contained in:
12
src/x.c
12
src/x.c
@ -703,3 +703,15 @@ void x_set_name(Con *con, const char *name) {
|
||||
FREE(state->name);
|
||||
state->name = sstrdup(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
|
||||
*
|
||||
*/
|
||||
void x_set_i3_atoms() {
|
||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_SOCKET_PATH, A_UTF8_STRING, 8,
|
||||
(config.ipc_socket_path != NULL ? strlen(config.ipc_socket_path) : 0),
|
||||
config.ipc_socket_path);
|
||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_CONFIG_PATH, A_UTF8_STRING, 8,
|
||||
strlen(current_configpath), current_configpath);
|
||||
}
|
||||
|
Reference in New Issue
Block a user