mirror of
https://github.com/swaywm/sway.git
synced 2024-11-11 21:14:10 +01:00
bar: free old position when changing
This commit is contained in:
parent
87334dbccb
commit
ba8981e44b
@ -17,6 +17,7 @@ struct cmd_results *bar_cmd_position(int argc, char **argv) {
|
|||||||
if (strcasecmp(valid[i], argv[0]) == 0) {
|
if (strcasecmp(valid[i], argv[0]) == 0) {
|
||||||
wlr_log(WLR_DEBUG, "Setting bar position '%s' for bar: %s",
|
wlr_log(WLR_DEBUG, "Setting bar position '%s' for bar: %s",
|
||||||
argv[0], config->current_bar->id);
|
argv[0], config->current_bar->id);
|
||||||
|
free(config->current_bar->position);
|
||||||
config->current_bar->position = strdup(argv[0]);
|
config->current_bar->position = strdup(argv[0]);
|
||||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user