aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-24 00:14:31 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-24 00:14:31 (GMT)
commit65c5fb3237d1c86a24919cfcd1f93f1dafa979d4 (patch)
tree3732fb8f31ee4a34babb66d8fd914627d3e851d3
parent36d1edfbf608c69528d903bbb798b819056ae903 (diff)
downloadfluxbox_paul-65c5fb3237d1c86a24919cfcd1f93f1dafa979d4.zip
fluxbox_paul-65c5fb3237d1c86a24919cfcd1f93f1dafa979d4.tar.bz2
make clicking on the border of the toolbar activate toolbar buttons
-rw-r--r--src/FbTk/Button.cc7
1 files 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) {
128 // hence the mark_if_deleted mechanism so that we can 128 // hence the mark_if_deleted mechanism so that we can
129 // update our state after the command 129 // update our state after the command
130 if (event.button > 0 && event.button <= 5 && 130 if (event.button > 0 && event.button <= 5 &&
131 // I'm not quite sure why we get events with e.g. y == height, but we do 131 event.x >= -static_cast<signed>(borderWidth()) &&
132 event.x >= 0 && event.x <= static_cast<signed>(width()) && 132 event.x <= static_cast<signed>(width()+borderWidth()) &&
133 event.y >= 0 && event.y <= static_cast<signed>(height()) && 133 event.y >= -static_cast<signed>(borderWidth()) &&
134 event.y <= static_cast<signed>(height()+borderWidth()) &&
134 m_onclick[event.button -1].get() != 0) 135 m_onclick[event.button -1].get() != 0)
135 m_onclick[event.button - 1]->execute(); 136 m_onclick[event.button - 1]->execute();
136 137