Discussion:
wxDialog::FindSuitableParent() picks splash screen
(too old to reply)
h***@googlemail.com
2009-05-09 11:36:56 UTC
Permalink
Hello,

FindSuitableParent() doesn't always find a suitable parent. I'm using
debugrpt and if the application crashes early then GetTopWindow()
returns the splash screen so after the timeout the modal report dialog
disappears and the application has to be killed from the task manager.

Is there a working around for this or should FindSuitableParent be
extended?

Thanks!

Stuart.
Vadim Zeitlin
2009-05-09 12:26:43 UTC
Permalink
On Sat, 9 May 2009 04:36:56 -0700 (PDT) "***@googlemail.com" <***@googlemail.com> wrote:

h> FindSuitableParent() doesn't always find a suitable parent. I'm using
h> debugrpt and if the application crashes early then GetTopWindow()
h> returns the splash screen so after the timeout the modal report dialog
h> disappears and the application has to be killed from the task manager.
h>
h> Is there a working around for this or should FindSuitableParent be
h> extended?

There are at least 2 bugs here:

1. wxSplashScreen doesn't set wxWS_EX_TRANSIENT for itself. This is easily
fixed (see http://trac.wxwidgets.org/changeset/60558) and could be
easily backported to 2.8 (which I imagine you use).

2. wxMSW-specific wxDialog::FindSuitableParent() imperfectly duplicates the
logic of wxDialogBase::GetParentForModalDialog() and there are also
separate places duplicating parts of this logic in wxGTK::wxDialog::
ShowModal(), wxMSW::wxTopLevelWindow::CreateDialog() and possible
elsewhere. I tried to fix this in r60559 but this is a much more
extensive change and so can't be easily backported to 2.8. You could
still try to apply these changes locally and test them and if you can
make a clean patch for 2.8 and submit it via Trac we could apply it to
the next release.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Loading...