提交 6729a639 编写于 作者: M mcherkas

8162973: Better component components

Reviewed-by: ssadetsky, prr, ahgross
上级 8ee9bc96
...@@ -98,7 +98,6 @@ BOOL AwtComponent::sm_restoreFocusAndActivation = FALSE; ...@@ -98,7 +98,6 @@ BOOL AwtComponent::sm_restoreFocusAndActivation = FALSE;
HWND AwtComponent::sm_focusOwner = NULL; HWND AwtComponent::sm_focusOwner = NULL;
HWND AwtComponent::sm_focusedWindow = NULL; HWND AwtComponent::sm_focusedWindow = NULL;
BOOL AwtComponent::sm_bMenuLoop = FALSE; BOOL AwtComponent::sm_bMenuLoop = FALSE;
AwtComponent* AwtComponent::sm_getComponentCache = NULL;
BOOL AwtComponent::sm_inSynthesizeFocus = FALSE; BOOL AwtComponent::sm_inSynthesizeFocus = FALSE;
/************************************************************************/ /************************************************************************/
...@@ -272,10 +271,6 @@ AwtComponent::~AwtComponent() ...@@ -272,10 +271,6 @@ AwtComponent::~AwtComponent()
* handle. * handle.
*/ */
DestroyHWnd(); DestroyHWnd();
if (sm_getComponentCache == this) {
sm_getComponentCache = NULL;
}
} }
void AwtComponent::Dispose() void AwtComponent::Dispose()
...@@ -348,9 +343,6 @@ AwtComponent* AwtComponent::GetComponent(HWND hWnd) { ...@@ -348,9 +343,6 @@ AwtComponent* AwtComponent::GetComponent(HWND hWnd) {
if (hWnd == AwtToolkit::GetInstance().GetHWnd()) { if (hWnd == AwtToolkit::GetInstance().GetHWnd()) {
return NULL; 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 // check that it's an AWT component from the same toolkit as the caller
if (::IsWindow(hWnd) && if (::IsWindow(hWnd) &&
...@@ -358,7 +350,7 @@ AwtComponent* AwtComponent::GetComponent(HWND hWnd) { ...@@ -358,7 +350,7 @@ AwtComponent* AwtComponent::GetComponent(HWND hWnd) {
{ {
DASSERT(WmAwtIsComponent != 0); DASSERT(WmAwtIsComponent != 0);
if (::SendMessage(hWnd, WmAwtIsComponent, 0, 0L)) { if (::SendMessage(hWnd, WmAwtIsComponent, 0, 0L)) {
return sm_getComponentCache = GetComponentImpl(hWnd); return GetComponentImpl(hWnd);
} }
} }
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册