From a509b80c479da3e1e93ba0c20da6e0a64e9c8ec9 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Wed, 5 Dec 2012 18:14:09 +0100 Subject: [PATCH] only react to Expose events when we are running --- dunst.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dunst.c b/dunst.c index 4338645..7debb34 100644 --- a/dunst.c +++ b/dunst.c @@ -804,9 +804,10 @@ void handleXEvents(void) XNextEvent(dc->dpy, &ev); switch (ev.type) { case Expose: - if (ev.xexpose.count == 0) + if (ev.xexpose.count == 0 && visible) { draw_win(); - mapdc(dc, win, scr.dim.w, font_h); + mapdc(dc, win, scr.dim.w, font_h); + } break; case SelectionNotify: if (ev.xselection.property == utf8)