summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2008-12-27 19:22:30 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2008-12-27 19:22:30 +0000
commitd34cc411e07122f8ace8ba25242a0a0a2e22b0c1 (patch)
treed3b4df5846201f415a8e59cf2c516e9456696d5b /src/Fl_x.cxx
parenta3589a181717329808ec595edce8e68629b7ade2 (diff)
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
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 4198b5015..b18aa7707 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -422,7 +422,7 @@ void fl_reset_spot(void)
//if (fl_xim_ic) XUnsetICFocus(fl_xim_ic);
}
-void fl_set_spot(int font, int size, int x, int y, int w, int h)
+void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win)
{
int change = 0;
XVaNestedList preedit_attr;
@@ -435,11 +435,11 @@ void fl_set_spot(int font, int size, int x, int y, int w, int h)
if (!fl_xim_ic || !fl_is_over_the_spot) return;
//XSetICFocus(fl_xim_ic);
- if (x != spot.x || y != spot.y) {
- spot.x = x;
- spot.y = y;
- spot.height = h;
- spot.width = w;
+ if (X != spot.x || Y != spot.y) {
+ spot.x = X;
+ spot.y = Y;
+ spot.height = H;
+ spot.width = W;
change = 1;
}
if (font != spotf || size != spots) {