# HG changeset patch # User bagiras # Date 1305035772 -14400 # Node ID 30b19cde5b69439055125401015363cbd601956c # Parent b9011986e4c899aa632a5960a7f15961d6442262 7035053: java/awt/event/MouseWheelEvent/DisabledComponent/DisabledComponent.java fails against jdk7 b134 Reviewed-by: art, denis, ant, dcherepanov diff -r b9011986e4c8 -r 30b19cde5b69 jdk/src/windows/native/sun/windows/awt_Choice.cpp --- a/jdk/src/windows/native/sun/windows/awt_Choice.cpp Wed May 04 14:46:11 2011 +0400 +++ b/jdk/src/windows/native/sun/windows/awt_Choice.cpp Tue May 10 17:56:12 2011 +0400 @@ -396,6 +396,12 @@ 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 -r b9011986e4c8 -r 30b19cde5b69 jdk/src/windows/native/sun/windows/awt_Component.cpp --- a/jdk/src/windows/native/sun/windows/awt_Component.cpp Wed May 04 14:46:11 2011 +0400 +++ b/jdk/src/windows/native/sun/windows/awt_Component.cpp Tue May 10 17:56:12 2011 +0400 @@ -364,7 +364,6 @@ AwtComponent *component = (AwtComponent *)::GetWindowLongPtr(hWnd, GWLP_USERDATA); DASSERT(!component || !IsBadReadPtr(component, sizeof(AwtComponent)) ); - DASSERT(!component || component->GetHWnd() == hWnd ); return component; } diff -r b9011986e4c8 -r 30b19cde5b69 jdk/src/windows/native/sun/windows/awt_Frame.cpp --- a/jdk/src/windows/native/sun/windows/awt_Frame.cpp Wed May 04 14:46:11 2011 +0400 +++ b/jdk/src/windows/native/sun/windows/awt_Frame.cpp Tue May 10 17:56:12 2011 +0400 @@ -344,17 +344,6 @@ 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