Fix two "hide the cursor" bugs related to click-to-focus windows (STR #1475)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5532 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2006-10-29 13:43:31 +00:00
parent 7fffbf7dea
commit 39cb1f8daf
2 changed files with 3 additions and 1 deletions

View File

@ -709,6 +709,7 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) {
return 1; return 1;
case FL_UNFOCUS: case FL_UNFOCUS:
if (active_r() && window()) window()->cursor(FL_CURSOR_DEFAULT);
if (mark_ == position_) { if (mark_ == position_) {
if (!(damage()&FL_DAMAGE_EXPOSE)) {minimal_update(position_); erase_cursor_only = 1;} if (!(damage()&FL_DAMAGE_EXPOSE)) {minimal_update(position_); erase_cursor_only = 1;}
} else //if (Fl::selection_owner() != this) } else //if (Fl::selection_owner() != this)

View File

@ -3218,8 +3218,9 @@ int Fl_Text_Display::handle(int event) {
if (Fl::event_dy()) return mVScrollBar->handle(event); if (Fl::event_dy()) return mVScrollBar->handle(event);
else return mHScrollBar->handle(event); else return mHScrollBar->handle(event);
case FL_FOCUS:
case FL_UNFOCUS: case FL_UNFOCUS:
if (active_r() && window()) window()->cursor(FL_CURSOR_DEFAULT);
case FL_FOCUS:
if (buffer()->selected()) redraw(); if (buffer()->selected()) redraw();
return 1; return 1;