summaryrefslogtreecommitdiff
path: root/src/Fl_Tabs.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_Tabs.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_Tabs.cxx')
-rw-r--r--src/Fl_Tabs.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx
index 669bb3fae..3723a13da 100644
--- a/src/Fl_Tabs.cxx
+++ b/src/Fl_Tabs.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.1 2001/08/05 15:34:28 easysw Exp $"
+// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.2 2001/11/03 19:24:22 easysw Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@@ -138,7 +138,7 @@ int Fl_Tabs::handle(int event) {
} else {
if (Fl::event_y() < y()+h()+H) goto DEFAULT;
}}
- take_focus();
+ if (Fl::visible_focus()) take_focus();
case FL_DRAG:
case FL_RELEASE:
o = which(Fl::event_x(), Fl::event_y());
@@ -147,8 +147,10 @@ int Fl_Tabs::handle(int event) {
return 1;
case FL_FOCUS:
case FL_UNFOCUS:
- redraw();
- return 1;
+ if (Fl::visible_focus()) {
+ redraw();
+ return 1;
+ } else return 0;
case FL_KEYBOARD:
switch (Fl::event_key()) {
case FL_Left:
@@ -309,5 +311,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
}
//
-// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.1 2001/08/05 15:34:28 easysw Exp $".
+// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.2 2001/11/03 19:24:22 easysw Exp $".
//