clicking on the edge of a button didn't work
This commit is contained in:
parent
e46f152ee5
commit
07a3b3939b
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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<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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue