aboutsummaryrefslogtreecommitdiffstats
path: root/swaynag
diff options
context:
space:
mode:
Diffstat (limited to 'swaynag')
-rw-r--r--swaynag/main.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/swaynag/main.c b/swaynag/main.c
index 112a8b2f..f7bf8a20 100644
--- a/swaynag/main.c
+++ b/swaynag/main.c
@@ -30,16 +30,6 @@ int main(int argc, char **argv) {
30 wl_list_init(&swaynag.outputs); 30 wl_list_init(&swaynag.outputs);
31 wl_list_init(&swaynag.seats); 31 wl_list_init(&swaynag.seats);
32 32
33 struct swaynag_button *button_close =
34 calloc(sizeof(struct swaynag_button), 1);
35 if (!button_close) {
36 perror("calloc");
37 return EXIT_FAILURE;
38 }
39 button_close->text = strdup("X");
40 button_close->type = SWAYNAG_ACTION_DISMISS;
41 list_add(swaynag.buttons, button_close);
42
43 char *config_path = NULL; 33 char *config_path = NULL;
44 bool debug = false; 34 bool debug = false;
45 int launch_status = swaynag_parse_options(argc, argv, NULL, NULL, NULL, 35 int launch_status = swaynag_parse_options(argc, argv, NULL, NULL, NULL,
@@ -100,6 +90,11 @@ int main(int argc, char **argv) {
100 90
101 swaynag_types_free(types); 91 swaynag_types_free(types);
102 92
93 struct swaynag_button button_close = { 0 };
94 button_close.text = strdup("X");
95 button_close.type = SWAYNAG_ACTION_DISMISS;
96 list_add(swaynag.buttons, &button_close);
97
103 if (swaynag.details.message) { 98 if (swaynag.details.message) {
104 list_add(swaynag.buttons, &swaynag.details.button_details); 99 list_add(swaynag.buttons, &swaynag.details.button_details);
105 } 100 }