changeset 16513:3dfe512305b9

8162973: Better component components Reviewed-by: ssadetsky, prr, ahgross
author serb
date Tue, 27 Sep 2016 16:35:28 +0300
parents f837d2a2a202
children 5117ab31c699
files src/java.desktop/windows/native/libawt/windows/awt_Component.cpp
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Tue Sep 27 03:23:40 2016 +0300
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Tue Sep 27 16:35:28 2016 +0300
@@ -99,7 +99,6 @@
 HWND AwtComponent::sm_focusOwner = NULL;
 HWND AwtComponent::sm_focusedWindow = NULL;
 BOOL AwtComponent::sm_bMenuLoop = FALSE;
-AwtComponent* AwtComponent::sm_getComponentCache = NULL;
 BOOL AwtComponent::sm_inSynthesizeFocus = FALSE;
 
 /************************************************************************/
@@ -276,10 +275,6 @@
      * handle.
      */
     DestroyHWnd();
-
-    if (sm_getComponentCache == this) {
-        sm_getComponentCache = NULL;
-    }
 }
 
 void AwtComponent::Dispose()
@@ -352,9 +347,6 @@
     if (hWnd == AwtToolkit::GetInstance().GetHWnd()) {
         return NULL;
     }
-    if (sm_getComponentCache && sm_getComponentCache->GetHWnd() == hWnd) {
-        return sm_getComponentCache;
-    }
 
     // check that it's an AWT component from the same toolkit as the caller
     if (::IsWindow(hWnd) &&
@@ -362,7 +354,7 @@
     {
         DASSERT(WmAwtIsComponent != 0);
         if (::SendMessage(hWnd, WmAwtIsComponent, 0, 0L)) {
-            return sm_getComponentCache = GetComponentImpl(hWnd);
+            return GetComponentImpl(hWnd);
         }
     }
     return NULL;