diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-06-04 16:48:31 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-06-04 16:51:27 +0900 |
commit | aca61aa5ffa4fab458d03e469b569c50952ed077 (patch) | |
tree | e54ea9f309291757225d4900f23bd13e5a084793 /desktop | |
parent | 3d30077af27c8a6e91fb91175e6d2ea9a6f03d11 (diff) |
tdf#91529 hopefully fixes the issue by painting immediately
Change-Id: I0c97e489150cd65d1ab1dbff4ee9f1699f89ac2e
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/splash/splash.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index 6794d15cfd56..63c8232a321e 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -59,6 +59,8 @@ public: virtual void dispose() SAL_OVERRIDE; // workwindow virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE; + void Redraw(); + }; class SplashScreen @@ -143,6 +145,15 @@ void SplashScreenWindow::dispose() IntroWindow::dispose(); } +void SplashScreenWindow::Redraw() +{ + Invalidate(); + // Trigger direct painting too - otherwise the splash screen won't be + // shown in some cases (when the idle timer won't be hit). + Paint(*this, Rectangle()); + Flush(); +} + SplashScreen::SplashScreen() : pWindow( new SplashScreenWindow (this) ) , _cProgressFrameColor(sal::static_int_cast< ColorData >(NOT_LOADED)) @@ -194,8 +205,7 @@ void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange) if ( _eBitmapMode == BM_FULLSCREEN ) pWindow->ShowFullScreenMode( true ); pWindow->Show(); - pWindow->Invalidate(); - pWindow->Flush(); + pWindow->Redraw(); } } @@ -352,8 +362,7 @@ void SplashScreen::updateStatus() return; if (!_bPaintProgress) _bPaintProgress = true; - pWindow->Invalidate(); - pWindow->Flush(); + pWindow->Redraw(); } // internal private methods @@ -364,7 +373,7 @@ IMPL_LINK( SplashScreen, AppEventListenerHdl, VclWindowEvent *, inEvent ) switch ( inEvent->GetId() ) { case VCLEVENT_WINDOW_SHOW: - pWindow->Invalidate(); + pWindow->Redraw(); break; default: break; |