From 3d789a1e709f87170398b525643794cf6ff52fde Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 21 Feb 2007 17:17:40 +0000 Subject: ButtonRelease should only trigger actions if ButtonPress was on the same button --- ChangeLog | 4 ++++ src/FbTk/Button.cc | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 45a7b5a..ca2c7f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ (Format: Year/Month/Day) Changes for 1.0rc3: +*07/02/21: + * Buttons should only run a command if the mouse was clicked down on the + same button, e.g. bug #1437864 (Mark) + FbTk/Button.cc *07/02/17: * Slit was creating a strut even when it wasn't visible (Mark) Slit.cc/hh diff --git a/src/FbTk/Button.cc b/src/FbTk/Button.cc index 767ed47..f13adf3 100644 --- a/src/FbTk/Button.cc +++ b/src/FbTk/Button.cc @@ -109,6 +109,8 @@ void Button::buttonPressEvent(XButtonEvent &event) { } void Button::buttonReleaseEvent(XButtonEvent &event) { + if (!m_pressed) // we don't want to pick up clicks from other widgets + return; m_pressed = false; bool update = false; bool been_deleted = false; -- cgit v0.11.2