From 210d404c9055f53a2f29e70bfd21b73b6b56284e Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Thu, 13 Sep 2012 07:19:59 +0200 Subject: [PATCH] add rangecheck for transparency --- dunst.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dunst.c b/dunst.c index 7399096..44f011d 100644 --- a/dunst.c +++ b/dunst.c @@ -1270,6 +1270,7 @@ void setup(void) CopyFromParent, DefaultVisual(dc->dpy, DefaultScreen(dc->dpy)), CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); + transparency = transparency > 100 ? 100 : transparency; setopacity(dc, win, (unsigned long)((100 - transparency) * (0xffffffff/100))); grab_key(&history_ks); }