summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-05-19 15:57:32 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-05-19 15:57:32 +0000
commit13d8286b8a43a1ee0556fe9d8eb67407b4c550fe (patch)
tree717ad1cc6159df3acfad54843e38b37c825b84bf /src
parent296efbe0929b4d3f7676d5eac62c3a13ba31de1a (diff)
FLUID didn't set the initial size of widgets properly (STR #850)
Fl_Tabs would steal focus away from its children on a window focus change (STR #870) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Tabs.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx
index dc75c064f..8d46e8726 100644
--- a/src/Fl_Tabs.cxx
+++ b/src/Fl_Tabs.cxx
@@ -149,7 +149,9 @@ int Fl_Tabs::handle(int event) {
if (!Fl::visible_focus()) return Fl_Group::handle(event);
if (Fl::event() == FL_RELEASE ||
Fl::event() == FL_SHORTCUT ||
- Fl::event() == FL_KEYBOARD) {
+ Fl::event() == FL_KEYBOARD ||
+ Fl::event() == FL_FOCUS ||
+ Fl::event() == FL_UNFOCUS) {
int H = tab_height();
if (H >= 0) {
H += Fl::box_dy(box());
@@ -158,7 +160,8 @@ int Fl_Tabs::handle(int event) {
H = Fl::box_dy(box()) - H;
damage(FL_DAMAGE_SCROLL, x(), y() + h() - H, w(), H);
}
- return 1;
+ if (Fl::event() == FL_FOCUS || Fl::event() == FL_UNFOCUS) return 0;
+ else return 1;
} else return Fl_Group::handle(event);
case FL_KEYBOARD:
switch (Fl::event_key()) {