1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

Use wGetColorForColormap() when allocating border pixel.

Cut down on code duplication by using the new wGetColorForColormap()
function in allocFrameBorderPixel().
This commit is contained in:
Iain Patterson
2013-03-25 21:29:48 +00:00
committed by Carlos R. Mafra
parent 69ff0d72cc
commit c3a2438fac

View File

@@ -34,6 +34,7 @@
#include "WindowMaker.h"
#include "GNUstep.h"
#include "texture.h"
#include "resources.h"
#include "screen.h"
#include "wcore.h"
#include "framewin.h"
@@ -65,14 +66,8 @@ static void allocFrameBorderPixel(Colormap colormap, char *color_name, unsigned
*pixel = NULL;
if (!XParseColor(dpy, colormap, color_name, &xcol)) {
wwarning(_("could not parse color \"%s\""), color_name);
if (! wGetColorForColormap(colormap, color_name, &xcol))
return;
}
if (!XAllocColor(dpy, colormap, &xcol)) {
wwarning(_("could not allocate color \"%s\""), color_name);
return;
}
*pixel = wmalloc(sizeof(unsigned long));
if (*pixel)