summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-03-05 00:46:39 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-03-05 00:46:39 +0000
commit2d90deead92ffe9dd1561c8a8dcb4187436f6798 (patch)
tree6823fb64e365189e2cf21dd78befa5008e7c46ef
parentddffcdf3284da1b67db12ef9af1a3da1d397ddc5 (diff)
Fix focus "bug" - Fl_Button didn't check to see if the widget would
accept keyboard focus before taking focus when clicked on. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1981 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rw-r--r--src/Fl_Button.cxx6
2 files changed, 5 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index 2e8bda1b5..c38667f40 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0b12
+ - Fl_Button didn't check to see if the widget could
+ accept focus before taking input focus.
- Fl_Help_View didn't preserve target names (e.g.
"filename.html#target") when following links.
- Drag-and-drop support for MacOS.
diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx
index 7940c9346..7cd87c63d 100644
--- a/src/Fl_Button.cxx
+++ b/src/Fl_Button.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Button.cxx,v 1.4.2.6.2.10 2002/01/01 15:11:30 easysw Exp $"
+// "$Id: Fl_Button.cxx,v 1.4.2.6.2.11 2002/03/05 00:46:39 easysw Exp $"
//
// Button widget for the Fast Light Tool Kit (FLTK).
//
@@ -66,7 +66,7 @@ int Fl_Button::handle(int event) {
// if ((value_?selection_color():color())==FL_GRAY) redraw();
return 1;
case FL_PUSH:
- if (Fl::visible_focus()) Fl::focus(this);
+ if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this);
case FL_DRAG:
if (Fl::event_inside(this)) {
if (type() == FL_RADIO_BUTTON) newval = 1;
@@ -149,5 +149,5 @@ Fl_Button::Fl_Button(int x,int y,int w,int h, const char *l)
}
//
-// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.10 2002/01/01 15:11:30 easysw Exp $".
+// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.11 2002/03/05 00:46:39 easysw Exp $".
//