diff --git a/WINGs/WINGs/WINGsP.h.in b/WINGs/WINGs/WINGsP.h.in index b7ed025a..0f0ca77e 100644 --- a/WINGs/WINGs/WINGsP.h.in +++ b/WINGs/WINGs/WINGsP.h.in @@ -427,8 +427,6 @@ struct W_Color { } flags; }; -#define W_PIXEL(c) (c)->color.pixel - /* ---[ wevent.c ]-------------------------------------------------------- */ diff --git a/WINGs/widgets.c b/WINGs/widgets.c index 35cafa85..12bfaa1f 100644 --- a/WINGs/widgets.c +++ b/WINGs/widgets.c @@ -725,14 +725,14 @@ WMScreen *WMCreateScreenWithRContext(Display * display, int screen, RContext * c gcv.graphics_exposures = False; gcv.function = GXxor; - gcv.foreground = W_PIXEL(scrPtr->white); + gcv.foreground = scrPtr->white->color.pixel; if (gcv.foreground == 0) gcv.foreground = 1; scrPtr->xorGC = XCreateGC(display, W_DRAWABLE(scrPtr), GCFunction | GCGraphicsExposures | GCForeground, &gcv); gcv.function = GXxor; - gcv.foreground = W_PIXEL(scrPtr->gray); + gcv.foreground = scrPtr->gray->color.pixel; gcv.subwindow_mode = IncludeInferiors; scrPtr->ixorGC = XCreateGC(display, W_DRAWABLE(scrPtr), GCFunction | GCGraphicsExposures | GCForeground | GCSubwindowMode, &gcv); @@ -743,8 +743,8 @@ WMScreen *WMCreateScreenWithRContext(Display * display, int screen, RContext * c scrPtr->clipGC = XCreateGC(display, W_DRAWABLE(scrPtr), GCFunction | GCGraphicsExposures, &gcv); stipple = XCreateBitmapFromData(display, W_DRAWABLE(scrPtr), STIPPLE_BITS, STIPPLE_WIDTH, STIPPLE_HEIGHT); - gcv.foreground = W_PIXEL(scrPtr->darkGray); - gcv.background = W_PIXEL(scrPtr->gray); + gcv.foreground = scrPtr->darkGray->color.pixel; + gcv.background = scrPtr->gray->color.pixel; gcv.fill_style = FillStippled; gcv.stipple = stipple; scrPtr->stippleGC = XCreateGC(display, W_DRAWABLE(scrPtr), diff --git a/WINGs/wtext.c b/WINGs/wtext.c index 994fa3d5..a1040e2e 100644 --- a/WINGs/wtext.c +++ b/WINGs/wtext.c @@ -2989,8 +2989,8 @@ WMText *WMCreateTextForDocumentType(WMWidget * parent, WMAction * parser, WMActi W_SetViewBackgroundColor(tPtr->view, tPtr->bgColor); gcv.graphics_exposures = False; - gcv.foreground = W_PIXEL(scr->gray); - gcv.background = W_PIXEL(scr->darkGray); + gcv.foreground = scr->gray->color.pixel; + gcv.background = scr->darkGray->color.pixel; gcv.fill_style = FillStippled; /* why not use scr->stipple here? */ gcv.stipple = XCreateBitmapFromData(dpy, W_DRAWABLE(scr), STIPPLE_BITS, STIPPLE_WIDTH, STIPPLE_HEIGHT); diff --git a/WINGs/wview.c b/WINGs/wview.c index 59dff304..2ab31f84 100644 --- a/WINGs/wview.c +++ b/WINGs/wview.c @@ -102,8 +102,8 @@ static W_View *createView(W_Screen * screen, W_View * parent) view->attribFlags |= CWBackPixel | CWColormap | CWBorderPixel | CWBackPixmap; view->attribs.background_pixmap = None; - view->attribs.background_pixel = W_PIXEL(screen->gray); - view->attribs.border_pixel = W_PIXEL(screen->black); + view->attribs.background_pixel = screen->gray->color.pixel; + view->attribs.border_pixel = screen->black->color.pixel; view->attribs.colormap = screen->colormap; view->backColor = WMRetainColor(screen->gray); @@ -491,9 +491,9 @@ void W_SetViewBackgroundColor(W_View * view, WMColor * color) view->attribFlags |= CWBackPixel; view->attribFlags &= ~CWBackPixmap; - view->attribs.background_pixel = W_PIXEL(color); + view->attribs.background_pixel = color->color.pixel; if (view->flags.realized) { - XSetWindowBackground(view->screen->display, view->window, W_PIXEL(color)); + XSetWindowBackground(view->screen->display, view->window, color->color.pixel); XClearWindow(view->screen->display, view->window); } } diff --git a/util/Makefile.am b/util/Makefile.am index 9271326d..07d9acb2 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -109,6 +109,7 @@ wmsetbg_LDADD = \ $(top_builddir)/wrlib/libwraster.la \ -lwings_rs \ -lwutil_rs \ + $(top_builddir)/WINGs/libWINGs.la \ @XLFLAGS@ @LIBXINERAMA@ @XLIBS@ @INTLIBS@ @FCLIBS@ @PANGO_LIBS@ wmgenmenu_LDFLAGS = \