match behaviour of transparency in dunstrc and config.h

The transparency value in dunstrc was the inverse of the transparency
value in config.h.
This commit is contained in:
Sascha Kruse 2012-09-13 07:11:14 +02:00
parent 15d36de115
commit 3219f21f2f

View File

@ -1270,7 +1270,7 @@ void setup(void)
CopyFromParent, DefaultVisual(dc->dpy, CopyFromParent, DefaultVisual(dc->dpy,
DefaultScreen(dc->dpy)), DefaultScreen(dc->dpy)),
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
setopacity(dc, win, (unsigned long)(transparency * (0xffffffff/100))); setopacity(dc, win, (unsigned long)((100 - transparency) * (0xffffffff/100)));
grab_key(&history_ks); grab_key(&history_ks);
} }
@ -1566,7 +1566,7 @@ dunst_ini_handle(void *user_data, const char *section,
else if (strcmp(name, "separator_height") == 0) else if (strcmp(name, "separator_height") == 0)
separator_height = atoi(value); separator_height = atoi(value);
else if (strcmp(name, "transparency") == 0) else if (strcmp(name, "transparency") == 0)
transparency = (100 - atoi(value)); transparency = atoi(value);
if (strcmp(name, "separator_color") == 0) { if (strcmp(name, "separator_color") == 0) {
char *str = dunst_ini_get_string(value); char *str = dunst_ini_get_string(value);
if (strcmp(str, "auto") == 0) if (strcmp(str, "auto") == 0)