From 07a3b3939bbdfa084f91c07984fdc60c2696a213 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 4 Feb 2007 18:41:08 +0000 Subject: clicking on the edge of a button didn't work --- ChangeLog | 4 ++++ src/FbTk/Button.cc | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96d5887..a5235b2 100644 --- a/ChangeLog +++ b/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 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) { // 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(width()) && - event.y > 0 && event.y < static_cast(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(width()) && + event.y >= 0 && event.y <= static_cast(height()) && m_onclick[event.button -1].get() != 0) m_onclick[event.button - 1]->execute(); -- cgit v0.11.2