diff --git a/src/windows/native/sun/windows/awt_Choice.cpp b/src/windows/native/sun/windows/awt_Choice.cpp index dfd9a6de6b3260e31385494c07cdd6409a2fc138..0d014ac56f945e9f4cf62b790d3e60cfc307c3bd 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 024915fcffcf691044d3442edd6d57f8f302e9c1..d4fe9e8766ff2d49361532eeca94ec71dfa6b356 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 6662d6d54c2f887fe92188b10ef58915418ca677..76811dfec035801af3276bbb7b9b11d850e2fb23 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