assert(parent);
createWindow(false);
parent->addChild(this);
- parent->layout();
+ if (parent->visible()) parent->layout();
_dispatcher->registerHandler(_window, this);
}
{
if (children) {
std::list<Widget*>::iterator it , end = _children.end();
- for (it = _children.begin(); it != end; ++it)
+ for (it = _children.begin(); it != end; ++it) {
(*it)->show(true);
+ }
}
if (!_visible) {
_visible = true;
void Widget::update()
{
+ if (!_visible) return;
_dirty = true;
if (parent())
parent()->layout(); // relay-out us and our siblings
void Widget::layout()
{
+ if (_children.empty() || !_visible) return;
if (_direction == Horizontal)
layoutHorz();
else
if (_ignore_config) {
_ignore_config--;
} else {
+ // only interested in these for top level windows
+ if (_parent) return;
+
XEvent ev;
ev.xconfigure.width = e.width;
ev.xconfigure.height = e.height;