提交 6ff7e678 编写于 作者: B bae

8076455: IME Composition Window is displayed on incorrect position

Reviewed-by: serb, azvegint
上级 7c85f1a6
...@@ -3761,12 +3761,14 @@ void AwtComponent::SetCompositionWindow(RECT& r) ...@@ -3761,12 +3761,14 @@ void AwtComponent::SetCompositionWindow(RECT& r)
void AwtComponent::OpenCandidateWindow(int x, int y) void AwtComponent::OpenCandidateWindow(int x, int y)
{ {
UINT bits = 1; UINT bits = 1;
RECT rc; POINT p = {0, 0}; // upper left corner of the client area
GetWindowRect(GetHWnd(), &rc); HWND hWnd = GetHWnd();
HWND hTop = GetTopLevelParentForWindow(hWnd);
::ClientToScreen(hTop, &p);
for (int iCandType=0; iCandType<32; iCandType++, bits<<=1) { for (int iCandType=0; iCandType<32; iCandType++, bits<<=1) {
if ( m_bitsCandType & bits ) if ( m_bitsCandType & bits )
SetCandidateWindow(iCandType, x-rc.left, y-rc.top); SetCandidateWindow(iCandType, x - p.x, y - p.y);
} }
if (m_bitsCandType != 0) { if (m_bitsCandType != 0) {
// REMIND: is there any chance GetProxyFocusOwner() returns NULL here? // REMIND: is there any chance GetProxyFocusOwner() returns NULL here?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册