Previously, when WMSetWidgetBackgroundPixmap() was called prior to
WMRealizeWidget(), no background pixmap was actually set.

This is because while the CWBackPixmap bit is correctly set to 1, the
CWBackPixel bit remains set to 1.  When XCreateWindow() is finally
called during realization, the background pixel takes precendence over the
background pixmap.

We fix this by setting CWBackPixel to 0 when setting CWBackPixmap to 1 and
vice versa.
---
 WINGs/wview.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/WINGs/wview.c b/WINGs/wview.c
index 610e640..0667458 100644
--- a/WINGs/wview.c
+++ b/WINGs/wview.c
@@ -490,6 +490,7 @@ void W_SetViewBackgroundColor(W_View * view, WMColor * 
color)
        view->backColor = WMRetainColor(color);
 
        view->attribFlags |= CWBackPixel;
+       view->attribFlags &= ~CWBackPixmap;
        view->attribs.background_pixel = W_PIXEL(color);
        if (view->flags.realized) {
                XSetWindowBackground(view->screen->display, view->window, 
W_PIXEL(color));
@@ -504,6 +505,7 @@ void W_SetViewBackgroundPixmap(W_View *view, WMPixmap *pix)
        view->backImage = WMRetainPixmap(pix);
 
        view->attribFlags |= CWBackPixmap;
+       view->attribFlags &= ~CWBackPixel;
        view->attribs.background_pixmap = pix->pixmap;
        if (view->flags.realized) {
                XSetWindowBackgroundPixmap(view->screen->display, view->window, 
pix->pixmap);
-- 
2.7.4


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to