Author Topic: The 28 march 2006 build is out.  (Read 24373 times)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: The 28 march 2006 build is out.
« Reply #15 on: March 29, 2006, 09:40:03 pm »
I still wonder if those bugs are my fault...

The current implementation of cbSplashScreen is really close, almost the same, to that of wxSplashScreen. The main difference is cbSS paints over the frame and wxSS uses an extra Window to draw.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: The 28 march 2006 build is out.
« Reply #16 on: March 29, 2006, 09:49:35 pm »
It is not your fault, we had similar problems with wxSplashScreen before, but worked around them ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson

  • Guest
Re: The 28 march 2006 build is out.
« Reply #17 on: March 29, 2006, 09:58:11 pm »
Well, look at app.cpp, line 575. Whatever is in that header, the default value is not used. Changing the default value in the header does not fix anything.

Yiannis was working on the startup problems yesterday afternoon, I thought he had fixed everything. Maybe there's more than one thing. Whatever it is, it is not the wxSTAY_ON_TOP flag, however. :)

Ok. Point taken. :D

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: The 28 march 2006 build is out.
« Reply #18 on: April 04, 2006, 05:51:11 am »

This patch seems to have fixed the Splash loop on my XP
system with SVN 2290.

A statement in the wxWidgets book states that the paint
routine should always allocated a DC even if it doesn't do the paint.
This avoids a loop with the lib constantly calling the paint
routine.

I moved the DC allocation to the top of the routine so it was
allocated on every paint call and the hang went away.

Patch submitted.

Code
Index: src/src/splashscreen.cpp
===================================================================
--- src/src/splashscreen.cpp (revision 2290)
+++ src/src/splashscreen.cpp (working copy)
@@ -22,12 +22,16 @@
 
 void cbSplashScreen::OnPaint(wxPaintEvent &)
 {
+    // an obscure statement in the wxWidgets book says to
+    // allocate the DC even if you don't paint to avoid
+    // a paint loop.    //pecan 2006/04/3
+  wxPaintDC paint_dc(this); //pecan 2006/04/3
   if (m_painted)
   {
     return;
   }
 
-  wxPaintDC paint_dc(this);
+  //-wxPaintDC paint_dc(this);
   DoPaint(paint_dc);
   m_painted = true; // paint once
 }

thanks
pecan

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: The 28 march 2006 build is out.
« Reply #19 on: April 04, 2006, 03:59:19 pm »
Good catch. I was even considering to remove the "paint once" thingy from there.

I'll modify my SVN copy to reflect that so it can be updated from there.

Thanks :)