Commit 3f02c27d authored by Nigel Liang's avatar Nigel Liang Committed by Alexandre Julliard

winex11.drv: Take into account position of preedit area in PreEditCaretCallback.

parent 6af199ef
......@@ -61,6 +61,7 @@ static LPBYTE CompositionString = NULL;
static DWORD dwCompStringSize = 0;
static LPBYTE ResultString = NULL;
static DWORD dwResultStringSize = 0;
static DWORD dwPreeditPos = 0;
static HMODULE hImmDll = NULL;
static HIMC (WINAPI *pImmAssociateContext)(HWND,HIMC);
......@@ -276,6 +277,8 @@ static int XIMPreEditStartCallback(XIC ic, XPointer client_data, XPointer call_d
TRACE("PreEditStartCallback %p\n",ic);
X11DRV_ImmSetOpenStatus(TRUE);
ximInComposeMode = TRUE;
SendMessageW(((InputContextData*)root_context)->IMC.hWnd,
EM_GETSEL, 0, (LPARAM)&dwPreeditPos);
return -1;
}
......@@ -284,6 +287,7 @@ static void XIMPreEditDoneCallback(XIC ic, XPointer client_data, XPointer call_d
TRACE("PreeditDoneCallback %p\n",ic);
ximInComposeMode = FALSE;
X11DRV_ImmSetOpenStatus(FALSE);
dwPreeditPos = 0;
}
static void XIMPreEditDrawCallback(XIM ic, XPointer client_data,
......@@ -362,7 +366,7 @@ static void XIMPreEditCaretCallback(XIC ic, XPointer client_data,
break;
}
SendMessageW(((InputContextData*)root_context)->IMC.hWnd,
EM_SETSEL, pos, pos);
EM_SETSEL, dwPreeditPos + pos, dwPreeditPos + pos);
P_C->position = pos;
}
TRACE("Finished\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment