--- a/src/hbcore/gui/hbsplashscreen.cpp Fri Sep 17 08:32:10 2010 +0300
+++ b/src/hbcore/gui/hbsplashscreen.cpp Mon Oct 04 00:38:12 2010 +0300
@@ -27,6 +27,7 @@
#include "hbsplashscreen_generic_p.h"
#include "hbsplash_p.h"
#include "hbsplashdefs_p.h"
+#include "hbapplication.h"
#include <QPainter>
#include <QApplication>
@@ -40,7 +41,7 @@
#if defined(Q_OS_SYMBIAN) && defined(HB_EFFECTS_OPENVG)
// When Symbian/EGL/OpenVG is available we can use the more efficient
-// implementation which is not just faster but is able to operate
+// implementation which is not only faster but is able to operate
// without having Qt or any other framework initialized. This means
// having truly 'instant' splash screens.
#define HB_SPLASH_DIRECT_WS
@@ -162,13 +163,23 @@
the application, this becomes important because the application startup
experience can be greatly improved by making sure the splash is shown as early
as possible.
+
+ On Symbian the splash will be automatically suppressed (i.e. not shown) if the
+ application was started to background, that is,
+ HbApplication::startedToBackground() returns true. To override this default
+ behavior, pass HbSplashScreen::ShowWhenStartingToBackground.
*/
void HbSplashScreen::start(Flags flags)
{
Flags realFlags = flags | requestProps()->mSplashFlags;
+ if (!realFlags.testFlag(ShowWhenStartingToBackground)
+ && HbApplication::startedToBackground()) {
+ splDebug("[hbsplash] app started to background, suppressing splash");
+ return;
+ }
if (!splashScreen) {
#ifdef HB_SPLASH_DIRECT_WS
- if (realFlags.testFlag(HbSplashScreen::ForceQt)) {
+ if (realFlags.testFlag(ForceQt)) {
splashScreen = new HbSplashScreenGeneric;
} else {
splashScreen = new HbSplashScreenSymbianVg;