X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk%2Fbutton.cc;h=3f283b00085ac9869a7e0d3b661995a34ede48ff;hb=6223b6a3efe7591feae9a342ad92f34e1aefed54;hp=fd40f7d57485ce87799a7abc6e06f35019798c4f;hpb=a3d036f60ed2333622ee9b61dbddcdc8fbc497c3;p=chaz%2Fopenbox diff --git a/otk/button.cc b/otk/button.cc index fd40f7d5..3f283b00 100644 --- a/otk/button.cc +++ b/otk/button.cc @@ -1,3 +1,4 @@ +#include #include "button.hh" namespace otk { @@ -66,6 +67,22 @@ void OtkButton::update(void) _dirty = false; } +int OtkButton::buttonPressHandler(const XButtonEvent &e) +{ + press(); + _dirty = true; + update(); + return OtkFocusWidget::buttonPressHandler(e); +} + +int OtkButton::buttonReleaseHandler(const XButtonEvent &e) +{ + release(); + _dirty = true; + update(); + return OtkFocusWidget::buttonReleaseHandler(e); +} + int OtkButton::exposeHandler(const XExposeEvent &e) { _dirty = true;