parent
fc49ebb286
commit
04248fd49e
8
dunst.c
8
dunst.c
@ -105,7 +105,7 @@ void update_lists()
|
|||||||
|
|
||||||
if (pause_display) {
|
if (pause_display) {
|
||||||
while (displayed->length > 0) {
|
while (displayed->length > 0) {
|
||||||
g_queue_insert_sorted(queue, g_queue_pop_head(queue),
|
g_queue_insert_sorted(queue, g_queue_pop_head(displayed),
|
||||||
notification_cmp_data, NULL);
|
notification_cmp_data, NULL);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -240,11 +240,11 @@ gboolean run(void *data)
|
|||||||
timeout_cnt--;
|
timeout_cnt--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayed->length > 0 && !xctx.visible) {
|
if (displayed->length > 0 && !xctx.visible && !pause_display) {
|
||||||
x_win_show();
|
x_win_show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayed->length == 0 && xctx.visible) {
|
if (xctx.visible && (pause_display || displayed->length == 0)) {
|
||||||
x_win_hide();
|
x_win_hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -355,9 +355,11 @@ void pause_signal_handler(int sig)
|
|||||||
{
|
{
|
||||||
if (sig == SIGUSR1) {
|
if (sig == SIGUSR1) {
|
||||||
pause_display = true;
|
pause_display = true;
|
||||||
|
wake_up();
|
||||||
}
|
}
|
||||||
if (sig == SIGUSR2) {
|
if (sig == SIGUSR2) {
|
||||||
pause_display = false;
|
pause_display = false;
|
||||||
|
wake_up();
|
||||||
}
|
}
|
||||||
|
|
||||||
signal(sig, pause_signal_handler);
|
signal(sig, pause_signal_handler);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user