summaryrefslogtreecommitdiff
path: root/src/Fl_Input_.cxx
diff options
context:
space:
mode:
authorYX <yxxinyuan@zju.edu.cn>2021-10-10 17:04:51 +0800
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-12-12 17:01:30 +0100
commit95d862fd5afc5e62504c45c213672ad04f3d9928 (patch)
treecbe70e9bfdc484340d1455348e90ccc1895bad86 /src/Fl_Input_.cxx
parentfae9f03cc91fc1cf9649fb18a34671c9774ce716 (diff)
Fix IME problem (issue #270)
Diffstat (limited to 'src/Fl_Input_.cxx')
-rw-r--r--src/Fl_Input_.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index b3dde0f25..75bd51c4b 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -285,6 +285,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
int desc = height-fl_descent();
float xpos = (float)(X - xscroll_ + 1);
int ypos = -yscroll_;
+ int ypos_cur = 0; //fix issue #270
for (; ypos < H;) {
// re-expand line unless it is the last one calculated above:
@@ -377,6 +378,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
fl_rectf((int)(xpos+curx+0.5), Y+ypos, 2, height);
}
Fl::insertion_point_location((int)xpos+curx, Y+ypos+height, height);
+ ypos_cur = ypos+height; //fix issue #270
}
CONTINUE:
@@ -399,7 +401,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, window());
+ (int)xpos+curx, Y+ypos_cur-fl_descent(), W, H, window()); //fix issue #270
}
}