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 17:35:44 +0900 |
commit | 4d68f980a5b41b6713563cf7119dd7b9eb5a67d4 (patch) | |
tree | 0b66c7ce025af931e37f7d098f2db6e6d4a5ec46 | |
parent | 4ad0738f0203d3219d5570e08836ca801624b0a4 (diff) |
tdf#91529 hopefully fixes the issue by painting immediately
Change-Id: I0c97e489150cd65d1ab1dbff4ee9f1699f89ac2e
(cherry picked from commit aca61aa5ffa4fab458d03e469b569c50952ed077)
-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; |