From 9834a687fc5180f0beba99bc15fe5763f5c20317 Mon Sep 17 00:00:00 2001 From: Marius Nita Date: Thu, 14 Nov 2002 11:42:38 +0000 Subject: [PATCH] widget update fix --- otk/widget.cc | 9 +++++++-- otk/widget.hh | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/otk/widget.cc b/otk/widget.cc index 124431c5..ea90a32f 100644 --- a/otk/widget.cc +++ b/otk/widget.cc @@ -262,7 +262,7 @@ void OtkWidget::adjustHorz(void) for (; str_it != str_end; ++str_it) { (*str_it)->setWidth(str_width - _bevel_width); - (*str_it)->update(); + //(*str_it)->update(); } } @@ -317,7 +317,7 @@ void OtkWidget::adjustVert(void) for (; str_it != str_end; ++str_it) { (*str_it)->setHeight(str_height - _bevel_width); - (*str_it)->update(); + //(*str_it)->update(); } } @@ -343,11 +343,16 @@ void OtkWidget::adjustVert(void) void OtkWidget::update(void) { + OtkWidgetList::iterator it = _children.begin(), end = _children.end(); + for (; it != end; ++it) + (*it)->update(); + if (_dirty) { adjust(); render(); XClearWindow(OBDisplay::display, _window); } + _dirty = false; } diff --git a/otk/widget.hh b/otk/widget.hh index ccda3b1f..85eefe79 100644 --- a/otk/widget.hh +++ b/otk/widget.hh @@ -25,7 +25,7 @@ public: virtual ~OtkWidget(); - void update(void); + virtual void update(void); inline Window getWindow(void) const { return _window; } inline const OtkWidget *getParent(void) const { return _parent; } -- 2.44.0