don't use hidden windows as implicit dialog parents neither
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -322,18 +322,6 @@ bool wxDialog::Show(bool show)
|
|||||||
{
|
{
|
||||||
// use it
|
// use it
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
|
|
||||||
// VZ: to make dialog behave properly we should reparent
|
|
||||||
// the dialog for Windows as well - unfortunately,
|
|
||||||
// following the docs for SetParent() results in this
|
|
||||||
// code which plainly doesn't work
|
|
||||||
#if 0
|
|
||||||
long dwStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE);
|
|
||||||
dwStyle &= ~WS_POPUP;
|
|
||||||
dwStyle |= WS_CHILD;
|
|
||||||
::SetWindowLong(GetHwnd(), GWL_STYLE, dwStyle);
|
|
||||||
::SetParent(GetHwnd(), GetHwndOf(parent));
|
|
||||||
#endif // 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -300,6 +300,8 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
if ( !MSWCreateControl(windowClass, msStyle, pos, size, value) )
|
if ( !MSWCreateControl(windowClass, msStyle, pos, size, value) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||||
|
|
||||||
#if wxUSE_RICHEDIT
|
#if wxUSE_RICHEDIT
|
||||||
if (m_isRich)
|
if (m_isRich)
|
||||||
{
|
{
|
||||||
|
@@ -193,8 +193,9 @@ bool wxTopLevelWindowMSW::CreateDialog(const wxChar *dlgTemplate,
|
|||||||
{
|
{
|
||||||
parent = wxTheApp->GetTopWindow();
|
parent = wxTheApp->GetTopWindow();
|
||||||
|
|
||||||
// but don't use the window which is about to be destroyed as parent
|
// but don't use the window which is currently hidden as then the
|
||||||
if ( parent->IsBeingDeleted() )
|
// dialog would be hidden as well
|
||||||
|
if ( parent && !parent->IsShown() )
|
||||||
{
|
{
|
||||||
parent = NULL;
|
parent = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user