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
This commit is contained in:
parent
2b2f81b93c
commit
236f68056d
1 changed files with 3 additions and 5 deletions
|
@ -248,13 +248,12 @@ void OtkWidget::render(void)
|
||||||
{
|
{
|
||||||
if (!_texture) return;
|
if (!_texture) return;
|
||||||
|
|
||||||
printf("rendering %lx\n", _texture);
|
|
||||||
|
|
||||||
_bg_pixmap = _texture->render(_rect.width(), _rect.height(), _bg_pixmap);
|
_bg_pixmap = _texture->render(_rect.width(), _rect.height(), _bg_pixmap);
|
||||||
|
|
||||||
if (_bg_pixmap)
|
if (_bg_pixmap) {
|
||||||
XSetWindowBackgroundPixmap(otk::OBDisplay::display, _window, _bg_pixmap);
|
XSetWindowBackgroundPixmap(otk::OBDisplay::display, _window, _bg_pixmap);
|
||||||
else {
|
_bg_pixel = None;
|
||||||
|
} else {
|
||||||
unsigned int pix = _texture->color().pixel();
|
unsigned int pix = _texture->color().pixel();
|
||||||
if (pix != _bg_pixel) {
|
if (pix != _bg_pixel) {
|
||||||
_bg_pixel = pix;
|
_bg_pixel = pix;
|
||||||
|
@ -388,7 +387,6 @@ void OtkWidget::adjustVert(void)
|
||||||
void OtkWidget::update(void)
|
void OtkWidget::update(void)
|
||||||
{
|
{
|
||||||
if (_dirty) {
|
if (_dirty) {
|
||||||
printf("widget dirty, redrawing\n");
|
|
||||||
adjust();
|
adjust();
|
||||||
render();
|
render();
|
||||||
XClearWindow(OBDisplay::display, _window);
|
XClearWindow(OBDisplay::display, _window);
|
||||||
|
|
Loading…
Reference in a new issue