diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-29 20:44:22 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-29 20:44:22 +0000 |
| commit | a5131e195974d6b61a9763e2bca9dc02bf36e474 (patch) | |
| tree | 951572cbcbed3547cb729223fe951b79cf3c3726 /src | |
| parent | 0daa36de390e6a67545f920f829be6097beef102 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Tabs.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index 7599c8019..a901aa64e 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.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 $". // |
