use get_real_screen() in initcolor()

This commit is contained in:
Julien Danjou 2007-09-28 11:37:36 +02:00
parent d4211d3bfb
commit 6efc6de67e
1 changed files with 1 additions and 6 deletions

View File

@ -497,12 +497,7 @@ get_numlockmask(Display *disp)
static unsigned long
initcolor(Display *disp, int scr, const char *colstr)
{
Colormap cmap;
/* bypass screen if scr is a Xinerama screen number */
if(XineramaIsActive(disp))
cmap = DefaultColormap(disp, DefaultScreen(disp));
else
cmap = DefaultColormap(disp, scr);
Colormap cmap = DefaultColormap(disp, get_real_screen(disp, scr));
XColor color;
if(!XAllocNamedColor(disp, cmap, colstr, &color, &color))
die("awesome: error, cannot allocate color '%s'\n", colstr);