From 22d2bfc73ca7b06dd87398e91ca37ab8968c1b3c Mon Sep 17 00:00:00 2001 From: pchelko Date: Tue, 8 Oct 2013 15:54:43 +0400 Subject: [PATCH] 8025585: Win: Popups in JFXPanel do not receive MouseWheel events Reviewed-by: anthony, art --- src/windows/native/sun/windows/awt_Toolkit.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/windows/native/sun/windows/awt_Toolkit.cpp b/src/windows/native/sun/windows/awt_Toolkit.cpp index cdb5247d6..ba8d6de26 100644 --- a/src/windows/native/sun/windows/awt_Toolkit.cpp +++ b/src/windows/native/sun/windows/awt_Toolkit.cpp @@ -1516,10 +1516,19 @@ BOOL AwtToolkit::PreProcessMouseMsg(AwtComponent* p, MSG& msg) * the mouse, not the Component with the input focus. */ - if (msg.message == WM_MOUSEWHEEL && - AwtToolkit::MainThread() == ::GetWindowThreadProcessId(hWndForWheel, NULL)) { + if (msg.message == WM_MOUSEWHEEL) { //i.e. mouse is over client area for this window - msg.hwnd = hWndForWheel; + DWORD hWndForWheelProcess; + DWORD hWndForWheelThread = ::GetWindowThreadProcessId(hWndForWheel, &hWndForWheelProcess); + if (::GetCurrentProcessId() == hWndForWheelProcess) { + if (AwtToolkit::MainThread() == hWndForWheelThread) { + msg.hwnd = hWndForWheel; + } else { + // Interop mode, redispatch the event to another toolkit. + ::SendMessage(hWndForWheel, msg.message, mouseWParam, mouseLParam); + return TRUE; + } + } } /* -- GitLab