From baa92d1d7da42270b6dafe8f6498f439e33394b6 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 21 Jun 2006 06:52:10 +0000 Subject: STR #1330: Repeat button now cancels timeout if it should get deactivated during a callback git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5219 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 ++ src/Fl_Repeat_Button.cxx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index 42ae10d68..01e7a2643 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ CHANGES IN FLTK 1.1.8 + - Repeat button now cancels timeout if it should get + deactivated during a callback (STR #1330) - Added support for assigning Fl_Menu_Items to array variables in Fluid (STR #1280) - Added --with-archflags configure option to allow diff --git a/src/Fl_Repeat_Button.cxx b/src/Fl_Repeat_Button.cxx index 638cc4c81..2252a3a24 100644 --- a/src/Fl_Repeat_Button.cxx +++ b/src/Fl_Repeat_Button.cxx @@ -49,6 +49,8 @@ int Fl_Repeat_Button::handle(int event) { if (Fl::visible_focus()) Fl::focus(this); newval = Fl::event_inside(this); J1: + if (!active()) + newval = 0; if (value(newval)) { if (newval) { Fl::add_timeout(INITIALREPEAT,repeat_callback,this); -- cgit v1.2.3