From 325f8ed181ab1d2f2e6e42d418c1e217ea93beb8 Mon Sep 17 00:00:00 2001 From: bagiras Date: Tue, 10 May 2011 17:56:12 +0400 Subject: [PATCH] 7035053: java/awt/event/MouseWheelEvent/DisabledComponent/DisabledComponent.java fails against jdk7 b134 Reviewed-by: art, denis, ant, dcherepanov --- src/windows/native/sun/windows/awt_Choice.cpp | 6 ++++++ src/windows/native/sun/windows/awt_Component.cpp | 1 - src/windows/native/sun/windows/awt_Frame.cpp | 11 ----------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/windows/native/sun/windows/awt_Choice.cpp b/src/windows/native/sun/windows/awt_Choice.cpp index dfd9a6de6..0d014ac56 100644 --- a/src/windows/native/sun/windows/awt_Choice.cpp +++ b/src/windows/native/sun/windows/awt_Choice.cpp @@ -396,6 +396,12 @@ LRESULT CALLBACK AwtChoice::ListWindowProc(HWND hwnd, UINT message, DASSERT(::IsWindow(hwnd)); + // This branch is required for the proper work of AwtComponent::GetComponent() method + // while hovering drop-down list + if (message == WmAwtIsComponent) { + return (LRESULT)TRUE; + } + switch (message) { case WM_LBUTTONDOWN: { DWORD curPos = ::GetMessagePos(); diff --git a/src/windows/native/sun/windows/awt_Component.cpp b/src/windows/native/sun/windows/awt_Component.cpp index 024915fcf..d4fe9e876 100644 --- a/src/windows/native/sun/windows/awt_Component.cpp +++ b/src/windows/native/sun/windows/awt_Component.cpp @@ -364,7 +364,6 @@ AwtComponent* AwtComponent::GetComponentImpl(HWND hWnd) { AwtComponent *component = (AwtComponent *)::GetWindowLongPtr(hWnd, GWLP_USERDATA); DASSERT(!component || !IsBadReadPtr(component, sizeof(AwtComponent)) ); - DASSERT(!component || component->GetHWnd() == hWnd ); return component; } diff --git a/src/windows/native/sun/windows/awt_Frame.cpp b/src/windows/native/sun/windows/awt_Frame.cpp index 6662d6d54..76811dfec 100644 --- a/src/windows/native/sun/windows/awt_Frame.cpp +++ b/src/windows/native/sun/windows/awt_Frame.cpp @@ -344,17 +344,6 @@ LRESULT AwtFrame::ProxyWindowProc(UINT message, WPARAM wParam, LPARAM lParam, Ms SetImeTargetComponent(NULL); } break; - // TODO: when a Choice's list is dropped down and we're scrolling in - // the list WM_MOUSEWHEEL messages come to the poxy, not to the list. Why? - case WM_MOUSEWHEEL: - focusOwner = AwtComponent::GetComponent(sm_focusOwner); - if (focusOwner != NULL && - focusOwner != this) // avoid recursive calls - { - retValue = focusOwner->WindowProc(message, wParam, lParam); - mr = mrConsume; - } - break; case WM_SETFOCUS: if (sm_inSynthesizeFocus) break; // pass it up the WindowProc chain -- GitLab