< prev index next >

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

Print this page

        

*** 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 --- 1,7 ---- /* ! * Copyright (c) 1996, 2017, 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
*** 3809,3818 **** --- 3809,3821 ---- void AwtComponent::OpenCandidateWindow(int x, int y) { UINT bits = 1; POINT p = {0, 0}; // upper left corner of the client area HWND hWnd = GetHWnd(); + if (!::IsWindowVisible(hWnd)) { + return; + } HWND hTop = GetTopLevelParentForWindow(hWnd); ::ClientToScreen(hTop, &p); if (!m_bitsCandType) { SetCandidateWindow(m_bitsCandType, x - p.x, y - p.y); return;
*** 4081,4090 **** --- 4084,4096 ---- // // Inquires candidate position according to the composed text // void AwtComponent::InquireCandidatePosition() { + if (!::IsWindowVisible(GetHWnd())) { + return; + } JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); // get global reference of WInputMethod class (run only once) static jclass wInputMethodCls = NULL; if (wInputMethodCls == NULL) {
< prev index next >