mirror of
https://github.com/swaywm/sway.git
synced 2024-12-26 23:18:26 +01:00
swaybar: always subscribe to mode and workspace
always subscribe to mode and workspace events, since we might need them after bar config updates even if we don't need them initially.
This commit is contained in:
parent
3cd7c71780
commit
a79994e119
1 changed files with 3 additions and 6 deletions
|
@ -426,12 +426,9 @@ bool ipc_initialize(struct swaybar *bar) {
|
|||
}
|
||||
free(res);
|
||||
|
||||
struct swaybar_config *config = bar->config;
|
||||
char subscribe[128]; // suitably large buffer
|
||||
len = snprintf(subscribe, 128,
|
||||
"[ \"barconfig_update\" , \"bar_state_update\" %s %s ]",
|
||||
config->binding_mode_indicator ? ", \"mode\"" : "",
|
||||
config->workspace_buttons ? ", \"workspace\"" : "");
|
||||
char *subscribe =
|
||||
"[ \"barconfig_update\", \"bar_state_update\", \"mode\", \"workspace\" ]";
|
||||
len = strlen(subscribe);
|
||||
free(ipc_single_command(bar->ipc_event_socketfd,
|
||||
IPC_SUBSCRIBE, subscribe, &len));
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue