Uncouple dunst.h from queues.c again
This commit is contained in:
parent
a7003e3616
commit
7f335b79d2
@ -282,6 +282,7 @@ static void on_close_notification(GDBusConnection *connection,
|
||||
guint32 id;
|
||||
g_variant_get(parameters, "(u)", &id);
|
||||
notification_close_by_id(id, 3);
|
||||
wake_up();
|
||||
g_dbus_method_invocation_return_value(invocation, NULL);
|
||||
g_dbus_connection_flush(connection, NULL, NULL, NULL);
|
||||
}
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include <glib.h>
|
||||
|
||||
#include "dbus.h"
|
||||
#include "dunst.h"
|
||||
#include "notification.h"
|
||||
#include "settings.h"
|
||||
|
||||
@ -76,7 +75,6 @@ int notification_close_by_id(int id, int reason)
|
||||
notification_closed(target, reason);
|
||||
}
|
||||
|
||||
wake_up();
|
||||
return reason;
|
||||
}
|
||||
|
||||
@ -107,8 +105,6 @@ void history_pop(void)
|
||||
n->start = 0;
|
||||
n->timeout = settings.sticky_history ? 0 : n->timeout;
|
||||
g_queue_push_head(queue, n);
|
||||
|
||||
wake_up();
|
||||
}
|
||||
|
||||
void history_push(notification *n)
|
||||
|
@ -843,6 +843,7 @@ gboolean x_mainloop_fd_dispatch(GSource *source, GSourceFunc callback,
|
||||
case ButtonRelease:
|
||||
if (ev.xbutton.window == xctx.win) {
|
||||
x_handle_click(ev);
|
||||
wake_up();
|
||||
}
|
||||
break;
|
||||
case KeyPress:
|
||||
@ -855,8 +856,10 @@ gboolean x_mainloop_fd_dispatch(GSource *source, GSourceFunc callback,
|
||||
&& settings.close_ks.mask == state) {
|
||||
if (displayed) {
|
||||
notification *n = g_queue_peek_head(displayed);
|
||||
if (n)
|
||||
if (n) {
|
||||
notification_close(n, 2);
|
||||
wake_up();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (settings.history_ks.str
|
||||
@ -864,18 +867,21 @@ gboolean x_mainloop_fd_dispatch(GSource *source, GSourceFunc callback,
|
||||
0) == settings.history_ks.sym
|
||||
&& settings.history_ks.mask == state) {
|
||||
history_pop();
|
||||
wake_up();
|
||||
}
|
||||
if (settings.close_all_ks.str
|
||||
&& XLookupKeysym(&ev.xkey,
|
||||
0) == settings.close_all_ks.sym
|
||||
&& settings.close_all_ks.mask == state) {
|
||||
move_all_to_history();
|
||||
wake_up();
|
||||
}
|
||||
if (settings.context_ks.str
|
||||
&& XLookupKeysym(&ev.xkey,
|
||||
0) == settings.context_ks.sym
|
||||
&& settings.context_ks.mask == state) {
|
||||
context_menu();
|
||||
wake_up();
|
||||
}
|
||||
break;
|
||||
case FocusIn:
|
||||
|
Loading…
x
Reference in New Issue
Block a user