summaryrefslogtreecommitdiff
path: root/otk/widget.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-11-15 02:40:57 +0000
committerDana Jansens <danakj@orodu.net>2002-11-15 02:40:57 +0000
commit6d68ac2256dc212dc0f2dd8a15d013d6ce3fc4b8 (patch)
tree77b56dc9bc0cf00c8f6cd2d1bea9e8fb68ab15de /otk/widget.cc
parentb7dba88a0addfa232781427891b615a6bc3147c6 (diff)
smarter expose. stop when the window is found
Diffstat (limited to 'otk/widget.cc')
-rw-r--r--otk/widget.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/otk/widget.cc b/otk/widget.cc
index aaec59b6..3ff484bc 100644
--- a/otk/widget.cc
+++ b/otk/widget.cc
@@ -390,16 +390,19 @@ void OtkWidget::removeChild(OtkWidget *child)
_children.erase(it);
}
-void OtkWidget::expose(const XExposeEvent &e)
+bool OtkWidget::expose(const XExposeEvent &e)
{
if (e.window == _window) {
_dirty = true;
update();
+ return true;
} else {
OtkWidgetList::iterator it = _children.begin(), end = _children.end();
for (; it != end; ++it)
- (*it)->expose(e);
+ if ((*it)->expose(e))
+ return true;
}
+ return false;
}
}