From d34cc411e07122f8ace8ba25242a0a0a2e22b0c1 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 27 Dec 2008 19:22:30 +0000 Subject: STR 2101: fl_set_spot() could crash on Windows under certain conditions. The Windows version needs a window to anchor the display window for complex text editing (IME), e.g. Japanese text. This update adds an additional Fl_Window argument to fl_set_spot(), but this is only used for Windows. The implemented version is tested with Japanese text input, including input in subwindows (test/subwindow.cxx). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6605 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Input_.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Fl_Input_.cxx') diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 199a594e7..e5174add0 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -353,7 +353,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { fl_pop_clip(); if (Fl::focus() == this) { fl_set_spot(textfont(), textsize(), - (int)xpos+curx, Y+ypos-fl_descent(), W, H); + (int)xpos+curx, Y+ypos-fl_descent(), W, H, window()); } } @@ -794,7 +794,7 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { return 1; case FL_FOCUS: - fl_set_spot(textfont(), textsize(), x(), y(), w(), h()); + fl_set_spot(textfont(), textsize(), x(), y(), w(), h(), window()); if (mark_ == position_) { minimal_update(size()+1); } else //if (Fl::selection_owner() != this) -- cgit v1.2.3