< prev index next >

jdk/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp

Print this page

        

*** 1592,1611 **** // if this toplevel is created in another thread, we should install // the modal hook into it to track window activation and mouse events DWORD fThread = ::GetWindowThreadProcessId(fHWnd, NULL); if (fThread != AwtToolkit::GetInstance().MainThread()) { // check if this thread has been already blocked ! BlockedThreadStruct *blockedThread = (BlockedThreadStruct *)sm_BlockedThreads.get((void *)fThread); if (blocked) { if (blockedThread == NULL) { blockedThread = new BlockedThreadStruct; blockedThread->framesCount = 1; blockedThread->modalHook = ::SetWindowsHookEx(WH_CBT, (HOOKPROC)AwtDialog::ModalFilterProc, 0, fThread); blockedThread->mouseHook = ::SetWindowsHookEx(WH_MOUSE, (HOOKPROC)AwtDialog::MouseHookProc_NonTT, 0, fThread); ! sm_BlockedThreads.put((void *)fThread, blockedThread); } else { blockedThread->framesCount++; } } else { // see the comment above: if Java Plugin behaviour when running in IE --- 1592,1611 ---- // if this toplevel is created in another thread, we should install // the modal hook into it to track window activation and mouse events DWORD fThread = ::GetWindowThreadProcessId(fHWnd, NULL); if (fThread != AwtToolkit::GetInstance().MainThread()) { // check if this thread has been already blocked ! BlockedThreadStruct *blockedThread = (BlockedThreadStruct *)sm_BlockedThreads.get((void *)(uintptr_t)fThread); if (blocked) { if (blockedThread == NULL) { blockedThread = new BlockedThreadStruct; blockedThread->framesCount = 1; blockedThread->modalHook = ::SetWindowsHookEx(WH_CBT, (HOOKPROC)AwtDialog::ModalFilterProc, 0, fThread); blockedThread->mouseHook = ::SetWindowsHookEx(WH_MOUSE, (HOOKPROC)AwtDialog::MouseHookProc_NonTT, 0, fThread); ! sm_BlockedThreads.put((void *)(uintptr_t)fThread, blockedThread); } else { blockedThread->framesCount++; } } else { // see the comment above: if Java Plugin behaviour when running in IE
*** 1613,1623 **** if (blockedThread != NULL) { DASSERT(blockedThread->framesCount > 0); if ((blockedThread->framesCount) == 1) { ::UnhookWindowsHookEx(blockedThread->modalHook); ::UnhookWindowsHookEx(blockedThread->mouseHook); ! sm_BlockedThreads.remove((void *)fThread); delete blockedThread; } else { blockedThread->framesCount--; } } --- 1613,1623 ---- if (blockedThread != NULL) { DASSERT(blockedThread->framesCount > 0); if ((blockedThread->framesCount) == 1) { ::UnhookWindowsHookEx(blockedThread->modalHook); ::UnhookWindowsHookEx(blockedThread->mouseHook); ! sm_BlockedThreads.remove((void *)(uintptr_t)fThread); delete blockedThread; } else { blockedThread->framesCount--; } }
< prev index next >