diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2015-12-21 15:31:09 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2015-12-21 15:31:09 +0100 |
commit | c803b79764cc570ffbb5354adeb58d0e89f230cc (patch) | |
tree | ec0bee15c3cd8fe858bd9e3b233bc741d095d974 | |
parent | Implement `barconfig_update` IPC event (diff) | |
download | sway-c803b79764cc570ffbb5354adeb58d0e89f230cc.tar.gz sway-c803b79764cc570ffbb5354adeb58d0e89f230cc.tar.zst sway-c803b79764cc570ffbb5354adeb58d0e89f230cc.zip |
Trigger event on bar mode|hidden_state commands
-rw-r--r-- | sway/commands.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/commands.c b/sway/commands.c index de5b9705..93c74915 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "resize.h" | 25 | #include "resize.h" |
26 | #include "input_state.h" | 26 | #include "input_state.h" |
27 | #include "criteria.h" | 27 | #include "criteria.h" |
28 | #include "ipc-server.h" | ||
28 | 29 | ||
29 | typedef struct cmd_results *sway_cmd(int argc, char **argv); | 30 | typedef struct cmd_results *sway_cmd(int argc, char **argv); |
30 | 31 | ||
@@ -1707,7 +1708,7 @@ static struct cmd_results *bar_set_hidden_state(struct bar_config *bar, const ch | |||
1707 | 1708 | ||
1708 | if (strcmp(old_state, bar->hidden_state) != 0) { | 1709 | if (strcmp(old_state, bar->hidden_state) != 0) { |
1709 | if (!config->reading) { | 1710 | if (!config->reading) { |
1710 | // TODO: IPC event | 1711 | ipc_event_barconfig_update(bar); |
1711 | } | 1712 | } |
1712 | sway_log(L_DEBUG, "Setting hidden_state: '%s' for bar: %s", bar->hidden_state, bar->id); | 1713 | sway_log(L_DEBUG, "Setting hidden_state: '%s' for bar: %s", bar->hidden_state, bar->id); |
1713 | } | 1714 | } |
@@ -1779,7 +1780,7 @@ static struct cmd_results *bar_set_mode(struct bar_config *bar, const char *mode | |||
1779 | 1780 | ||
1780 | if (strcmp(old_mode, bar->mode) != 0) { | 1781 | if (strcmp(old_mode, bar->mode) != 0) { |
1781 | if (!config->reading) { | 1782 | if (!config->reading) { |
1782 | // TODO: IPC event | 1783 | ipc_event_barconfig_update(bar); |
1783 | } | 1784 | } |
1784 | sway_log(L_DEBUG, "Setting mode: '%s' for bar: %s", bar->mode, bar->id); | 1785 | sway_log(L_DEBUG, "Setting mode: '%s' for bar: %s", bar->mode, bar->id); |
1785 | } | 1786 | } |