7035053: java/awt/event/MouseWheelEvent/DisabledComponent/DisabledComponent.java fails against jdk7 b134
Reviewed-by: art, denis, ant, dcherepanov
--- 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();
--- 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;
}
--- 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