diff options
| author | Carl E. Thompson <devel-fltk@carlthompson.net> | 1999-02-25 22:34:12 +0000 |
|---|---|---|
| committer | Carl E. Thompson <devel-fltk@carlthompson.net> | 1999-02-25 22:34:12 +0000 |
| commit | bdbc0b8b2e729ef61d08b732e6eba9da6edce28c (patch) | |
| tree | 23754b5a3bcef1fb085f833921b0f4e42ac8f832 /src | |
| parent | f89b5d0cf602e61030bbadce846e45686dab11fa (diff) | |
Fix for redraw bug in editor demo. Fl_Input_::position() didn't seem to
want to properly update the position if the input didn't have the focus.
This works, but I'm not sure if this is the most efficient solution. Could
someone who really understands the position() and minimal_update() routines
double-check this?
-Carl
git-svn-id: file:///fltk/svn/fltk/trunk@344 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Input_.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index e83fdcf2f..828f7ade6 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.cxx,v 1.16 1999/02/25 20:05:29 bill Exp $" +// "$Id: Fl_Input_.cxx,v 1.17 1999/02/25 22:34:12 carl Exp $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // @@ -397,10 +397,14 @@ int Fl_Input_::position(int p, int m) { if (Fl::selection_owner() == this) Fl::selection_owner(0); if (p != m) { // new position is a selection - if (Fl::focus()==this || Fl::pushed()==this) { +// This if doesn't seem to always work. I think that the position should +// should be updated even if the input isn't the focus widget widget or +// pushed(?). This change fixes the redraw bug in the editor demo after +// a find. +// if (Fl::focus()==this || Fl::pushed()==this) { if (p != position_) minimal_update(position_, p); if (m != mark_) minimal_update(mark_, m); - } +// } } else if (Fl::focus() == this) { // new position is a cursor if (position_ == mark_) { @@ -736,5 +740,5 @@ Fl_Input_::~Fl_Input_() { } // -// End of "$Id: Fl_Input_.cxx,v 1.16 1999/02/25 20:05:29 bill Exp $". +// End of "$Id: Fl_Input_.cxx,v 1.17 1999/02/25 22:34:12 carl Exp $". // |
