clicking on the edge of a button didn't work
markt markt
2 files changed,
7 insertions(+),
2 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,5 +1,9 @@
(Format: Year/Month/Day) Changes for 1.0rc3: +*07/02/04: + * Clicking on the edge of a button didn't work, bugs #1060891, #1517747 + (Mark) + FbTk/Button.cc *07/02/02: * Reverted patch from svn 4684, allowing transparency in window buttons, until we get it working with titlebar transparency, since the old buggy
M
src/FbTk/Button.cc
→
src/FbTk/Button.cc
@@ -118,8 +118,9 @@ // 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 && - event.x > 0 && event.x < static_cast<signed>(width()) && - event.y > 0 && event.y < static_cast<signed>(height()) && + // 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()) && m_onclick[event.button -1].get() != 0) m_onclick[event.button - 1]->execute();