summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-26 18:08:48 +0000
committerDana Jansens <danakj@orodu.net>2002-12-26 18:08:48 +0000
commit236f68056d5296087d39de8031c3a71524c1e830 (patch)
treed200f4828a3c2a610edfb2de8dfad51dfff5343b
parent2b2f81b93c89c2a2d6abc3b12dee66b8e2a0452d (diff)
fix booge bug that makes widgets not change their background when changing from a texture to a color when a color had been set previously
-rw-r--r--otk/widget.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/otk/widget.cc b/otk/widget.cc
index 9cc822ae..161e3e71 100644
--- a/otk/widget.cc
+++ b/otk/widget.cc
@@ -248,13 +248,12 @@ void OtkWidget::render(void)
{
if (!_texture) return;
- printf("rendering %lx\n", _texture);
-
_bg_pixmap = _texture->render(_rect.width(), _rect.height(), _bg_pixmap);
- if (_bg_pixmap)
+ if (_bg_pixmap) {
XSetWindowBackgroundPixmap(otk::OBDisplay::display, _window, _bg_pixmap);
- else {
+ _bg_pixel = None;
+ } else {
unsigned int pix = _texture->color().pixel();
if (pix != _bg_pixel) {
_bg_pixel = pix;
@@ -388,7 +387,6 @@ void OtkWidget::adjustVert(void)
void OtkWidget::update(void)
{
if (_dirty) {
- printf("widget dirty, redrawing\n");
adjust();
render();
XClearWindow(OBDisplay::display, _window);