summaryrefslogtreecommitdiff
path: root/src/Fl_Tabs.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-05-15 16:50:27 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-05-15 16:50:27 +0000
commite217ac0564bea7d20ca69beaad13164e799d8243 (patch)
tree252a38bd0a6f59ea2ffef8ffa4218869bfe106bc /src/Fl_Tabs.cxx
parent786e3ed0a879d3f32cdf43e68043aa38d959885f (diff)
Optimize redraw of focus stuff in radio/check buttons and tabs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2226 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tabs.cxx')
-rw-r--r--src/Fl_Tabs.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx
index ab4093a34..16a3adff2 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.9 2002/01/30 13:38:15 easysw Exp $"
+// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.10 2002/05/15 16:50:27 easysw Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@@ -140,7 +140,14 @@ int Fl_Tabs::handle(int event) {
case FL_FOCUS:
case FL_UNFOCUS:
if (Fl::visible_focus()) {
- redraw();
+ int H = tab_height();
+ if (H >= 0) {
+ H += Fl::box_dy(box());
+ damage(FL_DAMAGE_EXPOSE, x(), y(), w(), H);
+ } else {
+ H = Fl::box_dy(box()) - H;
+ damage(FL_DAMAGE_EXPOSE, x(), y() + h() - H, w(), H);
+ }
return 1;
} else return 0;
case FL_KEYBOARD:
@@ -293,5 +300,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.9 2002/01/30 13:38:15 easysw Exp $".
+// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.10 2002/05/15 16:50:27 easysw Exp $".
//