diff options
| -rw-r--r-- | CHANGES | 1 | ||||
| -rw-r--r-- | src/Fl_Check_Browser.cxx | 12 |
2 files changed, 9 insertions, 4 deletions
@@ -142,6 +142,7 @@ Changes in FLTK 1.4.0 Released: ??? ?? 2019 Bug Fixes - (add new items here) + - Fix FL_PUSH event handling of Fl_Check_Browser (STR #3004). - Fix a potential crash when a program exits before it opens a window (Windows only, STR #3484). - Fix Fl_PNG_Image error handling. An error was potentially caused diff --git a/src/Fl_Check_Browser.cxx b/src/Fl_Check_Browser.cxx index c08f5142d..22bdf9b3c 100644 --- a/src/Fl_Check_Browser.cxx +++ b/src/Fl_Check_Browser.cxx @@ -1,9 +1,9 @@ // // "$Id$" // -// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK). +// Fl_Check_Browser implementation for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2018 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -310,8 +310,12 @@ void Fl_Check_Browser::check_none() { } int Fl_Check_Browser::handle(int event) { - if (event==FL_PUSH) - deselect(); + if (event == FL_PUSH) { + int X, Y, W, H; + bbox(X, Y, W, H); + if (Fl::event_inside(X, Y, W, H)) + deselect(); + } return Fl_Browser_::handle(event); } |
