all repos — openbox @ 43f958996b3e5a6af08c1fd7aded883ba5ef5355

openbox fork - make it a bit more like ryudo

use a solid color for the default background
Dana Jansens danakj@orodu.net
commit

43f958996b3e5a6af08c1fd7aded883ba5ef5355

parent

a4c8a839a3decc54e515fd110710195eca23fd2b

1 files changed, 10 insertions(+), 4 deletions(-)

jump to
M otk/widget.ccotk/widget.cc

@@ -37,7 +37,6 @@ _ignore_config(0)

{ createWindow(overrideredir); _dispatcher->registerHandler(_window, this); - styleChanged(*RenderStyle::style(_screen)); } Widget::Widget(Widget *parent, Direction direction, int bevel)

@@ -485,7 +484,14 @@ }

void Widget::render() { - if (!_texture || !_dirty) return; + if (!_dirty) return; + if (!_texture) { + // set a solid color as the default background + XSetWindowBackground(**display, _window, + RenderStyle::style(_screen)-> + titlebarUnfocusBackground()->color().pixel()); + return; + } if (_borderwidth * 2 > _area.width() || _borderwidth * 2 > _area.height()) return; // no surface to draw on

@@ -514,9 +520,9 @@ for (it = _children.begin(); it != end; ++it)

(*it)->render(); } -void Widget::styleChanged(const RenderStyle &style) +void Widget::styleChanged(const RenderStyle &) { - _texture = style.titlebarUnfocusBackground(); + refresh(); } void Widget::exposeHandler(const XExposeEvent &e)