X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fbutton.cc;h=313d8acfcf52751e0b56162444763cba6a84ec4b;hb=14f17c96d069f08f73094e66692d57aeffa69f6b;hp=774aa11bf87eeb10e03a9a332604074297b21737;hpb=115fedf432d73f17ade48eaa2fa12dfd333bfcaa;p=chaz%2Fopenbox diff --git a/otk/button.cc b/otk/button.cc index 774aa11b..313d8acf 100644 --- a/otk/button.cc +++ b/otk/button.cc @@ -49,7 +49,11 @@ void Button::buttonPressHandler(const XButtonEvent &e) void Button::buttonReleaseHandler(const XButtonEvent &e) { Widget::buttonReleaseHandler(e); + bool p = _pressed; release(e.button); + if (p && !_pressed && e.x > 0 && e.y > 0 && + e.x < area().width() && e.y < area().height()) + clickHandler(_mouse_button); } void Button::styleChanged(const RenderStyle &style)