From 65c5fb3237d1c86a24919cfcd1f93f1dafa979d4 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Sat, 23 Aug 2008 17:14:31 -0700 Subject: make clicking on the border of the toolbar activate toolbar buttons --- src/FbTk/Button.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/FbTk/Button.cc b/src/FbTk/Button.cc index 9edbe5c..f38c20b 100644 --- a/src/FbTk/Button.cc +++ b/src/FbTk/Button.cc @@ -128,9 +128,10 @@ void Button::buttonReleaseEvent(XButtonEvent &event) { // 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(width()) && - event.y >= 0 && event.y <= static_cast(height()) && + event.x >= -static_cast(borderWidth()) && + event.x <= static_cast(width()+borderWidth()) && + event.y >= -static_cast(borderWidth()) && + event.y <= static_cast(height()+borderWidth()) && m_onclick[event.button -1].get() != 0) m_onclick[event.button - 1]->execute(); -- cgit v0.11.2