Merge pull request #442 from tsipinakis/dunstify-printid
Dunstify: Print id before blocking
This commit is contained in:
commit
9382cbbd15
10
dunstify.c
10
dunstify.c
@ -296,9 +296,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
GMainLoop *l = NULL;
|
GMainLoop *l = NULL;
|
||||||
|
|
||||||
if (block || action_strs)
|
if (block || action_strs) {
|
||||||
l = g_main_loop_new(NULL, false);
|
l = g_main_loop_new(NULL, false);
|
||||||
g_signal_connect(n, "closed", G_CALLBACK(closed), NULL);
|
g_signal_connect(n, "closed", G_CALLBACK(closed), NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (action_strs)
|
if (action_strs)
|
||||||
for (int i = 0; action_strs[i]; i++) {
|
for (int i = 0; action_strs[i]; i++) {
|
||||||
@ -317,13 +318,12 @@ int main(int argc, char *argv[])
|
|||||||
die(1);
|
die(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (printid)
|
||||||
|
g_print("%d\n", get_id(n));
|
||||||
|
|
||||||
if (block || action_strs)
|
if (block || action_strs)
|
||||||
g_main_loop_run(l);
|
g_main_loop_run(l);
|
||||||
|
|
||||||
if (printid) {
|
|
||||||
g_print("%d\n", get_id(n));
|
|
||||||
}
|
|
||||||
|
|
||||||
g_object_unref(G_OBJECT (n));
|
g_object_unref(G_OBJECT (n));
|
||||||
|
|
||||||
die(0);
|
die(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user