From b7dba88a0addfa232781427891b615a6bc3147c6 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 15 Nov 2002 02:38:52 +0000 Subject: [PATCH] try make drawing work better but its busted --- otk/button.cc | 6 ++++++ otk/button.hh | 5 +++-- otk/widget.hh | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/otk/button.cc b/otk/button.cc index 18838e87..9d6c43b1 100644 --- a/otk/button.cc +++ b/otk/button.cc @@ -65,4 +65,10 @@ void OtkButton::update(void) OtkFocusWidget::update(); } +void OtkButton::expose(const XExposeEvent &e) +{ + _dirty = true; + OtkFocusWidget::expose(e); +} + } diff --git a/otk/button.hh b/otk/button.hh index 6908322e..a4b3a978 100644 --- a/otk/button.hh +++ b/otk/button.hh @@ -33,14 +33,15 @@ public: void press(void); void release(void); - void update(void); + virtual void update(void); + virtual void expose(const XExposeEvent &e); private: std::string _text; //OtkPixmap _pixmap; bool _pressed; -// bool _dirty; + bool _dirty; BTexture *_pressed_focus_tx; BTexture *_pressed_unfocus_tx; diff --git a/otk/widget.hh b/otk/widget.hh index 1651a507..21e2911a 100644 --- a/otk/widget.hh +++ b/otk/widget.hh @@ -27,7 +27,7 @@ public: virtual void update(void); - void expose(const XExposeEvent &e); + virtual void expose(const XExposeEvent &e); inline Window getWindow(void) const { return _window; } inline const OtkWidget *getParent(void) const { return _parent; } -- 2.39.2