aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Button.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/FbTk/Button.cc b/src/FbTk/Button.cc
index 8dba936..767ed47 100644
--- a/src/FbTk/Button.cc
+++ b/src/FbTk/Button.cc
@@ -118,8 +118,9 @@ void Button::buttonReleaseEvent(XButtonEvent &event) {
118 // hence the mark_if_deleted mechanism so that we can 118 // hence the mark_if_deleted mechanism so that we can
119 // update our state after the command 119 // update our state after the command
120 if (event.button > 0 && event.button <= 5 && 120 if (event.button > 0 && event.button <= 5 &&
121 event.x > 0 && event.x < static_cast<signed>(width()) && 121 // I'm not quite sure why we get events with e.g. y == height, but we do
122 event.y > 0 && event.y < static_cast<signed>(height()) && 122 event.x >= 0 && event.x <= static_cast<signed>(width()) &&
123 event.y >= 0 && event.y <= static_cast<signed>(height()) &&
123 m_onclick[event.button -1].get() != 0) 124 m_onclick[event.button -1].get() != 0)
124 m_onclick[event.button - 1]->execute(); 125 m_onclick[event.button - 1]->execute();
125 126