mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
winex11.drv: Take into account position of preedit area in PreEditCaretCallback.
This commit is contained in:
parent
6af199ef9c
commit
3f02c27da9
1 changed files with 5 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue