< prev index next >

src/windows/native/sun/windows/awt_Component.cpp

Print this page

        

@@ -3837,10 +3837,13 @@
 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;

@@ -4119,10 +4122,13 @@
 //
 // 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 >