diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-24 00:14:31 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-24 00:14:31 (GMT) |
commit | 65c5fb3237d1c86a24919cfcd1f93f1dafa979d4 (patch) | |
tree | 3732fb8f31ee4a34babb66d8fd914627d3e851d3 /src/FbTk | |
parent | 36d1edfbf608c69528d903bbb798b819056ae903 (diff) | |
download | fluxbox-65c5fb3237d1c86a24919cfcd1f93f1dafa979d4.zip fluxbox-65c5fb3237d1c86a24919cfcd1f93f1dafa979d4.tar.bz2 |
make clicking on the border of the toolbar activate toolbar buttons
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Button.cc | 7 |
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 | ||