diff options
Diffstat (limited to 'sway/commands/bar/hidden_state.c')
-rw-r--r-- | sway/commands/bar/hidden_state.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sway/commands/bar/hidden_state.c b/sway/commands/bar/hidden_state.c index 245d0858..6641f184 100644 --- a/sway/commands/bar/hidden_state.c +++ b/sway/commands/bar/hidden_state.c | |||
@@ -23,7 +23,6 @@ static struct cmd_results *bar_set_hidden_state(struct bar_config *bar, | |||
23 | return cmd_results_new(CMD_INVALID, "hidden_state", | 23 | return cmd_results_new(CMD_INVALID, "hidden_state", |
24 | "Invalid value %s", hidden_state); | 24 | "Invalid value %s", hidden_state); |
25 | } | 25 | } |
26 | |||
27 | if (strcmp(old_state, bar->hidden_state) != 0) { | 26 | if (strcmp(old_state, bar->hidden_state) != 0) { |
28 | if (!config->reading) { | 27 | if (!config->reading) { |
29 | ipc_event_barconfig_update(bar); | 28 | ipc_event_barconfig_update(bar); |
@@ -31,7 +30,6 @@ static struct cmd_results *bar_set_hidden_state(struct bar_config *bar, | |||
31 | wlr_log(L_DEBUG, "Setting hidden_state: '%s' for bar: %s", | 30 | wlr_log(L_DEBUG, "Setting hidden_state: '%s' for bar: %s", |
32 | bar->hidden_state, bar->id); | 31 | bar->hidden_state, bar->id); |
33 | } | 32 | } |
34 | |||
35 | // free old mode | 33 | // free old mode |
36 | free(old_state); | 34 | free(old_state); |
37 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 35 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
@@ -45,14 +43,12 @@ struct cmd_results *bar_cmd_hidden_state(int argc, char **argv) { | |||
45 | if ((error = checkarg(argc, "hidden_state", EXPECTED_LESS_THAN, 3))) { | 43 | if ((error = checkarg(argc, "hidden_state", EXPECTED_LESS_THAN, 3))) { |
46 | return error; | 44 | return error; |
47 | } | 45 | } |
48 | |||
49 | if (config->reading && argc > 1) { | 46 | if (config->reading && argc > 1) { |
50 | return cmd_results_new(CMD_INVALID, "hidden_state", | 47 | return cmd_results_new(CMD_INVALID, "hidden_state", |
51 | "Unexpected value %s in config mode", argv[1]); | 48 | "Unexpected value %s in config mode", argv[1]); |
52 | } | 49 | } |
53 | 50 | ||
54 | const char *state = argv[0]; | 51 | const char *state = argv[0]; |
55 | |||
56 | if (config->reading) { | 52 | if (config->reading) { |
57 | return bar_set_hidden_state(config->current_bar, state); | 53 | return bar_set_hidden_state(config->current_bar, state); |
58 | } | 54 | } |
@@ -61,7 +57,6 @@ struct cmd_results *bar_cmd_hidden_state(int argc, char **argv) { | |||
61 | if (argc == 2) { | 57 | if (argc == 2) { |
62 | id = argv[1]; | 58 | id = argv[1]; |
63 | } | 59 | } |
64 | |||
65 | struct bar_config *bar; | 60 | struct bar_config *bar; |
66 | for (int i = 0; i < config->bars->length; ++i) { | 61 | for (int i = 0; i < config->bars->length; ++i) { |
67 | bar = config->bars->items[i]; | 62 | bar = config->bars->items[i]; |