mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-09 23:34:14 +01:00
WINGs: Set widget background pixmaps before realization.
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.
This commit is contained in:
committed by
Carlos R. Mafra
parent
3140c09240
commit
83f0b764e6
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user