< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_Component.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 3756,3766 **** UINT bits = 1; POINT p = {0, 0}; // upper left corner of the client area HWND hWnd = GetHWnd(); HWND hTop = GetTopLevelParentForWindow(hWnd); ::ClientToScreen(hTop, &p); ! for (int iCandType=0; iCandType<32; iCandType++, bits<<=1) { if ( m_bitsCandType & bits ) SetCandidateWindow(iCandType, x - p.x, y - p.y); } if (m_bitsCandType != 0) { --- 3756,3769 ---- UINT bits = 1; POINT p = {0, 0}; // upper left corner of the client area HWND hWnd = GetHWnd(); HWND hTop = GetTopLevelParentForWindow(hWnd); ::ClientToScreen(hTop, &p); ! if (!m_bitsCandType) { ! SetCandidateWindow(m_bitsCandType, x - p.x, y - p.y); ! return; ! } for (int iCandType=0; iCandType<32; iCandType++, bits<<=1) { if ( m_bitsCandType & bits ) SetCandidateWindow(iCandType, x - p.x, y - p.y); } if (m_bitsCandType != 0) {
*** 3774,3784 **** { HWND hwnd = ImmGetHWnd(); HIMC hIMC = ImmGetContext(hwnd); CANDIDATEFORM cf; cf.dwIndex = iCandType; ! cf.dwStyle = CFS_CANDIDATEPOS; cf.ptCurrentPos.x = x; cf.ptCurrentPos.y = y; ImmSetCandidateWindow(hIMC, &cf); ImmReleaseContext(hwnd, hIMC); --- 3777,3787 ---- { HWND hwnd = ImmGetHWnd(); HIMC hIMC = ImmGetContext(hwnd); CANDIDATEFORM cf; cf.dwIndex = iCandType; ! cf.dwStyle = CFS_POINT; cf.ptCurrentPos.x = x; cf.ptCurrentPos.y = y; ImmSetCandidateWindow(hIMC, &cf); ImmReleaseContext(hwnd, hIMC);
*** 3806,3817 **** return mrDoDefault; } MsgRouting AwtComponent::WmImeNotify(WPARAM subMsg, LPARAM bitsCandType) { ! if (!m_useNativeCompWindow && subMsg == IMN_OPENCANDIDATE) { ! m_bitsCandType = bitsCandType; InquireCandidatePosition(); return mrConsume; } return mrDoDefault; } --- 3809,3824 ---- return mrDoDefault; } MsgRouting AwtComponent::WmImeNotify(WPARAM subMsg, LPARAM bitsCandType) { ! if (!m_useNativeCompWindow) { ! if (subMsg == IMN_OPENCANDIDATE) { ! m_bitsCandType = subMsg; ! } else if (subMsg != IMN_SETCANDIDATEPOS) { ! m_bitsCandType = 0; ! } InquireCandidatePosition(); return mrConsume; } return mrDoDefault; }
*** 4075,4085 **** LPARAM lParam, LRESULT &retVal, MsgRouting &mr) { if (mr != mrConsume) { HWND proxy = GetProxyFocusOwner(); if (proxy != NULL && ::IsWindowEnabled(proxy)) { ! if (proxy != GetHWnd()) { retVal = ::SendMessage(proxy, message, wParam, lParam); } else { retVal = ComCtl32Util::GetInstance().DefWindowProc(NULL, proxy, message, wParam, lParam); } --- 4082,4092 ---- LPARAM lParam, LRESULT &retVal, MsgRouting &mr) { if (mr != mrConsume) { HWND proxy = GetProxyFocusOwner(); if (proxy != NULL && ::IsWindowEnabled(proxy)) { ! if (proxy != GetHWnd() && IsContainer()) { retVal = ::SendMessage(proxy, message, wParam, lParam); } else { retVal = ComCtl32Util::GetInstance().DefWindowProc(NULL, proxy, message, wParam, lParam); }
< prev index next >