all repos — openbox @ 6d68ac2256dc212dc0f2dd8a15d013d6ce3fc4b8

openbox fork - make it a bit more like ryudo

smarter expose. stop when the window is found
Dana Jansens danakj@orodu.net
commit

6d68ac2256dc212dc0f2dd8a15d013d6ce3fc4b8

parent

b7dba88a0addfa232781427891b615a6bc3147c6

4 files changed, 9 insertions(+), 6 deletions(-)

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

@@ -65,10 +65,10 @@ } else

OtkFocusWidget::update(); } -void OtkButton::expose(const XExposeEvent &e) +bool OtkButton::expose(const XExposeEvent &e) { _dirty = true; - OtkFocusWidget::expose(e); + return OtkFocusWidget::expose(e); } }
M otk/button.hhotk/button.hh

@@ -34,7 +34,7 @@ void press(void);

void release(void); virtual void update(void); - virtual void expose(const XExposeEvent &e); + virtual bool expose(const XExposeEvent &e); private:
M otk/widget.ccotk/widget.cc

@@ -390,16 +390,19 @@ if (it != _children.end())

_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; } }
M otk/widget.hhotk/widget.hh

@@ -27,7 +27,7 @@ virtual ~OtkWidget();

virtual void update(void); - virtual void expose(const XExposeEvent &e); + virtual bool expose(const XExposeEvent &e); inline Window getWindow(void) const { return _window; } inline const OtkWidget *getParent(void) const { return _parent; }