summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2018-11-29 00:06:33 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2018-11-29 00:06:33 +0000
commit2ef3b39c6a100cf6b73828e7c7bf7f2b001a798c (patch)
tree651f6c7a2e2ea86934b7a5f986df35355a1ed56d /src
parent91bb8bce1f1156712ca01e52ea0f9b27f82e4804 (diff)
Fix FL_PUSH event handling of Fl_Check_Browser (STR #3004).
Test if the FL_PUSH event is inside the widget area and inside the scrollbars (if scrollbars are visible). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13138 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Check_Browser.cxx12
1 files changed, 8 insertions, 4 deletions
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);
}