mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
Do not stop compilation if library Xmu is not found
We use only 1 function from this library, and it is in a case that should be rare nowadays: displays with indexed color. This commit makes it acceptable to compile if the library is missing.
This commit is contained in:
committed by
Carlos R. Mafra
parent
4665972175
commit
e2cfed3377
@@ -25,7 +25,10 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#ifdef HAVE_LIBXMU
|
||||
#include <X11/Xmu/StdCmap.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -137,6 +140,7 @@ static Bool allocateStandardPseudoColor(RContext * ctx, XStandardColormap * stdc
|
||||
|
||||
static Bool setupStandardColormap(RContext * ctx, Atom property)
|
||||
{
|
||||
#ifdef HAVE_LIBXMU
|
||||
if (!XmuLookupStandardColormap(ctx->dpy, ctx->screen_number,
|
||||
ctx->visual->visualid, ctx->depth, property, True, True)) {
|
||||
RErrorCode = RERR_STDCMAPFAIL;
|
||||
@@ -144,6 +148,12 @@ static Bool setupStandardColormap(RContext * ctx, Atom property)
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
#else
|
||||
(void) ctx;
|
||||
(void) property;
|
||||
RErrorCode = RERR_STDCMAPFAIL;
|
||||
return False;
|
||||
#endif
|
||||
}
|
||||
|
||||
static XColor *allocateColor(RContext *ctx, XColor *colors, int ncolors)
|
||||
|
||||
Reference in New Issue
Block a user