make clicking on the border of the toolbar activate toolbar buttons
Mark Tiefenbruck mark@fluxbox.org
1 files changed,
4 insertions(+),
3 deletions(-)
jump to
M
src/FbTk/Button.cc
→
src/FbTk/Button.cc
@@ -128,9 +128,10 @@ // This command may result in this object being deleted
// hence the mark_if_deleted mechanism so that we can // update our state after the command if (event.button > 0 && event.button <= 5 && - // I'm not quite sure why we get events with e.g. y == height, but we do - event.x >= 0 && event.x <= static_cast<signed>(width()) && - event.y >= 0 && event.y <= static_cast<signed>(height()) && + event.x >= -static_cast<signed>(borderWidth()) && + event.x <= static_cast<signed>(width()+borderWidth()) && + event.y >= -static_cast<signed>(borderWidth()) && + event.y <= static_cast<signed>(height()+borderWidth()) && m_onclick[event.button -1].get() != 0) m_onclick[event.button - 1]->execute();