Fix focus hogging by the Fl_Tabs widget.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2713 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2002-10-29 20:44:22 +00:00
parent 0daa36de39
commit a5131e1959
2 changed files with 9 additions and 4 deletions
+2
View File
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.2
- The Fl_Tabs widget should no longer be a focus hog;
previously it would take focus from child widgets.
- The file chooser now activates the OK button when
opening a directory in directory selection mode.
- Fixed a bug in the file chooser when entering an
+7 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.14 2002/10/22 17:39:12 easysw Exp $"
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.15 2002/10/29 20:44:22 easysw Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@@ -139,7 +139,10 @@ int Fl_Tabs::handle(int event) {
return 1;
case FL_FOCUS:
case FL_UNFOCUS:
if (Fl::visible_focus()) {
if (!Fl::visible_focus()) return Fl_Group::handle(event);
if (Fl::event() == FL_PUSH ||
Fl::event() == FL_SHORTCUT ||
Fl::event() == FL_KEYBOARD) {
int H = tab_height();
if (H >= 0) {
H += Fl::box_dy(box());
@@ -149,7 +152,7 @@ int Fl_Tabs::handle(int event) {
damage(FL_DAMAGE_SCROLL, x(), y() + h() - H, w(), H);
}
return 1;
} else return 0;
} else return Fl_Group::handle(event);
case FL_KEYBOARD:
switch (Fl::event_key()) {
case FL_Left:
@@ -299,5 +302,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.14 2002/10/22 17:39:12 easysw Exp $".
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.15 2002/10/29 20:44:22 easysw Exp $".
//