mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 14:05:48 +02:00
alpha vs xresources - addressing compatibility issue ref. #4
This commit is contained in:
parent
fc8c1c56c6
commit
9e721014cd
18
dmenu.c
18
dmenu.c
@ -1922,6 +1922,15 @@ main(int argc, char *argv[])
|
|||||||
parentwin);
|
parentwin);
|
||||||
|
|
||||||
#if ALPHA_PATCH
|
#if ALPHA_PATCH
|
||||||
|
/* These need to be checked before we init the visuals. */
|
||||||
|
for (i = 1; i < argc; i++) {
|
||||||
|
if (!strcmp(argv[i], "-o")) { /* opacity, pass -o 0 to disable alpha */
|
||||||
|
opacity = atoi(argv[++i]);
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
argv[i][0] = '\0'; // mark as used
|
||||||
|
}
|
||||||
xinitvisual();
|
xinitvisual();
|
||||||
drw = drw_create(dpy, screen, root, wa.width, wa.height, visual, depth, cmap);
|
drw = drw_create(dpy, screen, root, wa.width, wa.height, visual, depth, cmap);
|
||||||
#else
|
#else
|
||||||
@ -1930,7 +1939,10 @@ main(int argc, char *argv[])
|
|||||||
readxresources();
|
readxresources();
|
||||||
#endif // XRESOURCES_PATCH
|
#endif // XRESOURCES_PATCH
|
||||||
|
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++) {
|
||||||
|
if (argv[i][0] == '\0')
|
||||||
|
continue;
|
||||||
|
|
||||||
/* these options take no arguments */
|
/* these options take no arguments */
|
||||||
if (!strcmp(argv[i], "-v")) { /* prints version information */
|
if (!strcmp(argv[i], "-v")) { /* prints version information */
|
||||||
puts("dmenu-"VERSION);
|
puts("dmenu-"VERSION);
|
||||||
@ -2099,8 +2111,10 @@ main(int argc, char *argv[])
|
|||||||
insert(text, strlen(text));
|
insert(text, strlen(text));
|
||||||
}
|
}
|
||||||
#endif // INITIALTEXT_PATCH
|
#endif // INITIALTEXT_PATCH
|
||||||
else
|
else {
|
||||||
usage();
|
usage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if XRESOURCES_PATCH
|
#if XRESOURCES_PATCH
|
||||||
#if PANGO_PATCH
|
#if PANGO_PATCH
|
||||||
|
Loading…
Reference in New Issue
Block a user