< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_Window.cpp
Print this page
*** 1149,1167 ****
--- 1149,1171 ----
}
void AwtWindow::InitOwner(AwtWindow *owner)
{
DASSERT(owner != NULL);
+ AwtWindow *initialOwner = owner;
while (owner != NULL && owner->IsSimpleWindow()) {
HWND ownerOwnerHWND = ::GetWindow(owner->GetHWnd(), GW_OWNER);
if (ownerOwnerHWND == NULL) {
owner = NULL;
break;
}
owner = (AwtWindow *)AwtComponent::GetComponent(ownerOwnerHWND);
}
+ if (!owner) {
+ owner = initialOwner->GetOwningFrameOrDialog();
+ }
m_owningFrameDialog = (AwtFrame *)owner;
}
void AwtWindow::moveToDefaultLocation() {
HWND boggy = ::CreateWindow(GetClassName(), L"BOGGY", WS_OVERLAPPED, CW_USEDEFAULT, 0 ,0, 0,
< prev index next >