X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/blobdiff_plain/59fc927dc9f183802621138534fa6eaafe5593ba..688a56e8ab67b56550e2874d9d7423f0d435bfd9:/src/resources.c diff --git a/src/resources.c b/src/resources.c index 05e9bca0..2ce8ac02 100644 --- a/src/resources.c +++ b/src/resources.c @@ -36,30 +36,25 @@ #include "screen.h" #include "pixmap.h" - -int -wGetColor(WScreen *scr, char *color_name, XColor *color) +int wGetColor(WScreen * scr, char *color_name, XColor * color) { - if (!XParseColor(dpy, scr->w_colormap, color_name, color)) { - wwarning(_("could not parse color \"%s\""), color_name); - return False; - } - if (!XAllocColor(dpy, scr->w_colormap, color)) { - wwarning(_("could not allocate color \"%s\""), color_name); - return False; - } - return True; + if (!XParseColor(dpy, scr->w_colormap, color_name, color)) { + wwarning(_("could not parse color \"%s\""), color_name); + return False; + } + if (!XAllocColor(dpy, scr->w_colormap, color)) { + wwarning(_("could not allocate color \"%s\""), color_name); + return False; + } + return True; } - -void -wFreeColor(WScreen *scr, unsigned long pixel) +void wFreeColor(WScreen * scr, unsigned long pixel) { - if (pixel!=scr->white_pixel && pixel!=scr->black_pixel) { - unsigned long colors[1]; + if (pixel != scr->white_pixel && pixel != scr->black_pixel) { + unsigned long colors[1]; - colors[0] = pixel; - XFreeColors(dpy, scr->w_colormap, colors, 1, 0); - } + colors[0] = pixel; + XFreeColors(dpy, scr->w_colormap, colors, 1, 0); + } } -