summaryrefslogtreecommitdiff
path: root/src/Fl_Browser_.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-11-03 19:24:22 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-11-03 19:24:22 +0000
commit0884e2ba0de126599e212f8a98f06d3a1df7a609 (patch)
tree08d6569b31711561cf4788f830ada150f288d343 /src/Fl_Browser_.cxx
parentd3acd6c475de7fb811c4bde93ca735e3526ad82f (diff)
Update all non-text widgets that take keyboard focus to check
Fl::visible_focus() before taking or accepting focus; this allows one to disable the new 1.1 keyboard focus stuff completely (not much sense allowing focus if you can't see it...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1679 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Browser_.cxx')
-rw-r--r--src/Fl_Browser_.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx
index 6bb40fab9..f59744f62 100644
--- a/src/Fl_Browser_.cxx
+++ b/src/Fl_Browser_.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.7 2001/10/29 03:44:32 easysw Exp $"
+// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.8 2001/11/03 19:24:22 easysw Exp $"
//
// Base Browser widget class for the Fast Light Tool Kit (FLTK).
//
@@ -552,7 +552,7 @@ int Fl_Browser_::handle(int event) {
switch (event) {
case FL_PUSH:
if (!Fl::event_inside(X, Y, W, H)) return 0;
- take_focus();
+ if (Fl::visible_focus()) take_focus();
my = py = Fl::event_y();
change = 0;
if (type() == FL_NORMAL_BROWSER || !top_)
@@ -649,7 +649,7 @@ int Fl_Browser_::handle(int event) {
return 1;
case FL_FOCUS:
case FL_UNFOCUS:
- if (type() >= FL_HOLD_BROWSER) {
+ if (type() >= FL_HOLD_BROWSER && Fl::visible_focus()) {
redraw();
return 1;
} else return 0;
@@ -713,5 +713,5 @@ void Fl_Browser_::item_select(void*, int) {}
int Fl_Browser_::item_selected(void* l) const {return l==selection_;}
//
-// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.7 2001/10/29 03:44:32 easysw Exp $".
+// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.8 2001/11/03 19:24:22 easysw Exp $".
//