diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-05-17 11:31:09 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-05-17 11:31:09 +0000 |
| commit | 6a726f5087b3cfaa939ece41ec66c700ea96e53d (patch) | |
| tree | a38dfa2a73aa81686bba71b1e1e36b39d187e00b /src/Fl_Button.cxx | |
| parent | 8b3472fa1fab96394445703477d07244ebe71b05 (diff) | |
Fix redraw area for focus box on buttons with no box.
Typo in comments for new string functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Button.cxx')
| -rw-r--r-- | src/Fl_Button.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index 614ea19be..9300765c3 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Button.cxx,v 1.4.2.6.2.13 2002/05/15 16:50:27 easysw Exp $" +// "$Id: Fl_Button.cxx,v 1.4.2.6.2.14 2002/05/17 11:31:09 easysw Exp $" // // Button widget for the Fast Light Tool Kit (FLTK). // @@ -113,11 +113,9 @@ int Fl_Button::handle(int event) { // Buttons with the FL_NO_BOX boxtype need a parent to // redraw, since it is responsible for redrawing the // background... - Fl_Widget *p; - for (p = parent(); p; p = p->parent()) - if (p->box() != FL_NO_BOX) break; - if (p) p->damage(FL_DAMAGE_EXPOSE, x(), y(), w() + 1, h() + 1); - else window()->damage(FL_DAMAGE_EXPOSE, x(), y(), w() + 1, h() + 1); + int X = x() > 0 ? x() - 1 : 0; + int Y = y() > 0 ? y() - 1 : 0; + window()->damage(FL_DAMAGE_EXPOSE, X, Y, w() + 2, h() + 2); } else redraw(); return 1; @@ -149,5 +147,5 @@ Fl_Button::Fl_Button(int x,int y,int w,int h, const char *l) } // -// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.13 2002/05/15 16:50:27 easysw Exp $". +// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.14 2002/05/17 11:31:09 easysw Exp $". // |
