From 78ba452469cb53bc6c9eac778c05546f805cd6d6 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Mon, 12 Sep 2011 18:02:55 +0200 Subject: [PATCH] s/msgqueuehead/msgqueue --- dunst.c | 22 +++++++++++----------- dunst_dbus.c | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dunst.c b/dunst.c index 6c447fd..d5dc8ce 100644 --- a/dunst.c +++ b/dunst.c @@ -45,7 +45,7 @@ static Bool topbar = True; static DC *dc; static Window win; static double global_timeout = 10; -static msg_queue_t *msgqueuehead = NULL; +static msg_queue_t *msgqueue = NULL; static time_t now; static int listen_to_dbus = True; static int visible = False; @@ -160,11 +160,11 @@ handleXEvents(void) { void next_win(void) { - if(msgqueuehead == NULL) { + if(msgqueue == NULL) { return; } - msgqueuehead = pop(msgqueuehead); - if(msgqueuehead == NULL) { + msgqueue = pop(msgqueue); + if(msgqueue == NULL) { /* hide window */ if(!visible) { /* window is already hidden */ @@ -175,7 +175,7 @@ next_win(void) { XFlush(dc->dpy); visible = False; } else { - drawmsg(msgqueuehead->msg); + drawmsg(msgqueue->msg); } } @@ -188,9 +188,9 @@ run(void) { dbus_poll(); } now = time(&now); - if(msgqueuehead != NULL) { + if(msgqueue != NULL) { show_win(); - if(difftime(now, msgqueuehead->start) > global_timeout) { + if(difftime(now, msgqueue->start) > global_timeout) { next_win(); } handleXEvents(); @@ -263,7 +263,7 @@ show_win(void) { /* window is already visible */ return; } - if(msgqueuehead == NULL) { + if(msgqueue == NULL) { /* there's nothing to show */ return; } @@ -271,7 +271,7 @@ show_win(void) { XGrabButton(dc->dpy, AnyButton, AnyModifier, win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XFlush(dc->dpy); - drawmsg(msgqueuehead->msg); + drawmsg(msgqueue->msg); visible = True; } @@ -315,7 +315,7 @@ main(int argc, char *argv[]) { else if(!strcmp(argv[i], "-to")) global_timeout = atoi(argv[++i]); else if(!strcmp(argv[i], "-msg")) { - msgqueuehead = append(msgqueuehead, argv[++i]); + msgqueue = append(msgqueue, argv[++i]); listen_to_dbus = False; } else if(!strcmp(argv[i], "-mon")) { @@ -363,7 +363,7 @@ main(int argc, char *argv[]) { dc = initdc(); initfont(dc, font); setup(); - if(msgqueuehead != NULL) { + if(msgqueue != NULL) { show_win(); } run(); diff --git a/dunst_dbus.c b/dunst_dbus.c index 116912d..4f63c38 100644 --- a/dunst_dbus.c +++ b/dunst_dbus.c @@ -47,7 +47,7 @@ dbus_poll(void) { /* make timeout smaller if we are displaying a message * to improve responsivness for mouse clicks */ - if(msgqueuehead == NULL) { + if(msgqueue == NULL) { dbus_connection_read_write(dbus_conn, DBUS_POLL_TIMEOUT); } else { dbus_connection_read_write(dbus_conn, 100); @@ -199,7 +199,7 @@ notify(DBusMessage *dmsg) { sprintf(msg, "%s: %s", appname, summary); } - msgqueuehead = append(msgqueuehead, msg); + msgqueue = append(msgqueue, msg); reply = dbus_message_new_method_return(dmsg);