[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: Has patch (was Re: [XaraXtreme-dev] XCode - built Mac Version will not display wxXtra SplashScreen)
- From: Alex Bligh <alex@xxxxxxxxxxx>
- Date: Sat, 01 Jul 2006 21:04:47 +0100
- Subject: Re: Has patch (was Re: [XaraXtreme-dev] XCode - built Mac Version will not display wxXtra SplashScreen)
Ben,
I'd rather fix this by addressing the underlying problem (the
premature deletion of the window) than address the symptom
(that this makes the bitmap unreferenceable). I'll have a look
in a bit.
Please could you try the patch I have committed in r1396,
without your patch in. If you're not on the commits list,
I've put it below. It just moves from using the chained
constructor to using the specific ::Create method. This
should mean the RTTI is right in the Create method when
called, so FilterEvent will not destroy the window. I
have checked that at least on GTK the RTTI is right at
the point at which Create is called.
Alex
Index: Trunk/XaraLX/wxXtra/advsplash.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/advsplash.cpp (revision 1395)
+++ Trunk/XaraLX/wxXtra/advsplash.cpp (revision 1396)
@@ -33,9 +33,12 @@
* slightly too small.
*/
-wxAdvSplashScreen::wxAdvSplashScreen(const wxBitmap& bitmap, long
splashStyle, int milliseconds, wxWindow* parent, wxWindowID id, const
wxPoint& pos, const wxSize& size, long style):
- wxFrame(parent, id, wxEmptyString, wxPoint(0,0), wxSize(100, 100),
style)
+wxAdvSplashScreen::wxAdvSplashScreen(const wxBitmap& bitmap, long
splashStyle, int milliseconds, wxWindow* parent, wxWindowID id, const
wxPoint& pos, const wxSize& size, long style)
{
+ // Do the create here, not as a chained constructor, so the
+ // RTTI is in place for the Mac which sends events immediately
+ Create(parent, id, wxEmptyString, wxPoint(0,0), wxSize(100, 100),
style);
+
// At least for GTK+ 2.0, this hint is not available.
#if defined(__WXGTK20__)
#if GTK_CHECK_VERSION(2,2,0)