From: Francesco Montorsi Date: Thu, 5 Feb 2009 17:46:00 +0000 (+0000) Subject: always use wxSTAY_ON_TOP (closes #10447) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e12152104f6f3a24afe09284bf5ad7b3cedfff1c?ds=inline always use wxSTAY_ON_TOP (closes #10447) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/busyinfo.h b/interface/wx/busyinfo.h index 287f8371e6..3600c987ad 100644 --- a/interface/wx/busyinfo.h +++ b/interface/wx/busyinfo.h @@ -48,6 +48,9 @@ wxApp::Yield for more details). The simplest way to do it is to use wxWindowDisabler class as illustrated in the above example. + Note that a wxBusyInfo is always built with the @c wxSTAY_ON_TOP window style + (see wxFrame window styles for more info). + @library{wxcore} @category{cmndlg} */ diff --git a/src/generic/busyinfo.cpp b/src/generic/busyinfo.cpp index ca53631e33..cf767882c5 100644 --- a/src/generic/busyinfo.cpp +++ b/src/generic/busyinfo.cpp @@ -43,7 +43,7 @@ wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message) #else wxSIMPLE_BORDER #endif - | wxFRAME_TOOL_WINDOW) + | wxFRAME_TOOL_WINDOW | wxSTAY_ON_TOP) { wxPanel *panel = new wxPanel( this ); wxStaticText *text = new wxStaticText(panel, wxID_ANY, message); @@ -114,13 +114,7 @@ wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message) wxBusyInfo::wxBusyInfo(const wxString& message, wxWindow *parent) { - m_InfoFrame = new wxInfoFrame( parent, message); - if ( parent && parent->HasFlag(wxSTAY_ON_TOP) ) - { - // we must have this flag to be in front of our parent if it has it - m_InfoFrame->SetWindowStyleFlag(wxSTAY_ON_TOP); - } - + m_InfoFrame = new wxInfoFrame(parent, message); m_InfoFrame->Show(true); m_InfoFrame->Refresh(); m_InfoFrame->Update();