changeset 4194:997f464f8446

7035053: java/awt/event/MouseWheelEvent/DisabledComponent/DisabledComponent.java fails against jdk7 b134 Reviewed-by: art, denis, ant, dcherepanov
author bagiras
date Tue, 10 May 2011 17:56:12 +0400
parents 1b154e3ab359
children dde5cc0d768c
files src/windows/native/sun/windows/awt_Choice.cpp src/windows/native/sun/windows/awt_Component.cpp src/windows/native/sun/windows/awt_Frame.cpp
diffstat 3 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/sun/windows/awt_Choice.cpp	Wed May 04 14:46:11 2011 +0400
+++ b/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/src/windows/native/sun/windows/awt_Component.cpp	Wed May 04 14:46:11 2011 +0400
+++ b/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/src/windows/native/sun/windows/awt_Frame.cpp	Wed May 04 14:46:11 2011 +0400
+++ b/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