use get_real_screen() in initcolor()
This commit is contained in:
parent
d4211d3bfb
commit
6efc6de67e
7
config.c
7
config.c
|
@ -497,12 +497,7 @@ get_numlockmask(Display *disp)
|
||||||
static unsigned long
|
static unsigned long
|
||||||
initcolor(Display *disp, int scr, const char *colstr)
|
initcolor(Display *disp, int scr, const char *colstr)
|
||||||
{
|
{
|
||||||
Colormap cmap;
|
Colormap cmap = DefaultColormap(disp, get_real_screen(disp, scr));
|
||||||
/* bypass screen if scr is a Xinerama screen number */
|
|
||||||
if(XineramaIsActive(disp))
|
|
||||||
cmap = DefaultColormap(disp, DefaultScreen(disp));
|
|
||||||
else
|
|
||||||
cmap = DefaultColormap(disp, scr);
|
|
||||||
XColor color;
|
XColor color;
|
||||||
if(!XAllocNamedColor(disp, cmap, colstr, &color, &color))
|
if(!XAllocNamedColor(disp, cmap, colstr, &color, &color))
|
||||||
die("awesome: error, cannot allocate color '%s'\n", colstr);
|
die("awesome: error, cannot allocate color '%s'\n", colstr);
|
||||||
|
|
Loading…
Reference in New Issue