diff options
| author | Bill Spitzak <spitzak@gmail.com> | 1999-02-26 07:07:56 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 1999-02-26 07:07:56 +0000 |
| commit | f19b6ee3e4d30e9c6b121625a68b8fd215583f08 (patch) | |
| tree | 02dd05ec032c161eea225df90372f56cd729e1fe /src/Fl_Input_.cxx | |
| parent | bdbc0b8b2e729ef61d08b732e6eba9da6edce28c (diff) | |
Fixed editor demo redraw bug (actually same fix as somebody else made).
Highlight is cleared if any other widget makes an X selection.
git-svn-id: file:///fltk/svn/fltk/trunk@345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Input_.cxx')
| -rw-r--r-- | src/Fl_Input_.cxx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 828f7ade6..a1899261c 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.cxx,v 1.17 1999/02/25 22:34:12 carl Exp $" +// "$Id: Fl_Input_.cxx,v 1.18 1999/02/26 07:07:56 bill Exp $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // @@ -396,20 +396,13 @@ int Fl_Input_::position(int p, int m) { if (p == position_ && m == mark_) return 0; if (Fl::selection_owner() == this) Fl::selection_owner(0); if (p != m) { - // new position is a selection -// 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) { + if (p != position_) minimal_update(position_, p); + if (m != mark_) minimal_update(mark_, m); + } else { // new position is a cursor if (position_ == mark_) { // old position was just a cursor - if (!(damage()&FL_DAMAGE_EXPOSE)) { + if (Fl::focus() == this && !(damage()&FL_DAMAGE_EXPOSE)) { minimal_update(position_); erase_cursor_only = 1; } } else { // old position was a selection @@ -625,7 +618,7 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { case FL_SELECTIONCLEAR: minimal_update(mark_, position_); - // mark_ = position_; + mark_ = position_; return 1; case FL_PASTE: { @@ -740,5 +733,5 @@ Fl_Input_::~Fl_Input_() { } // -// End of "$Id: Fl_Input_.cxx,v 1.17 1999/02/25 22:34:12 carl Exp $". +// End of "$Id: Fl_Input_.cxx,v 1.18 1999/02/26 07:07:56 bill Exp $". // |
