Kaydet (Commit) aca61aa5 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

tdf#91529 hopefully fixes the issue by painting immediately

Change-Id: I0c97e489150cd65d1ab1dbff4ee9f1699f89ac2e
üst 3d30077a
...@@ -59,6 +59,8 @@ public: ...@@ -59,6 +59,8 @@ public:
virtual void dispose() SAL_OVERRIDE; virtual void dispose() SAL_OVERRIDE;
// workwindow // workwindow
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE; virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
void Redraw();
}; };
class SplashScreen class SplashScreen
...@@ -143,6 +145,15 @@ void SplashScreenWindow::dispose() ...@@ -143,6 +145,15 @@ void SplashScreenWindow::dispose()
IntroWindow::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() SplashScreen::SplashScreen()
: pWindow( new SplashScreenWindow (this) ) : pWindow( new SplashScreenWindow (this) )
, _cProgressFrameColor(sal::static_int_cast< ColorData >(NOT_LOADED)) , _cProgressFrameColor(sal::static_int_cast< ColorData >(NOT_LOADED))
...@@ -194,8 +205,7 @@ void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange) ...@@ -194,8 +205,7 @@ void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange)
if ( _eBitmapMode == BM_FULLSCREEN ) if ( _eBitmapMode == BM_FULLSCREEN )
pWindow->ShowFullScreenMode( true ); pWindow->ShowFullScreenMode( true );
pWindow->Show(); pWindow->Show();
pWindow->Invalidate(); pWindow->Redraw();
pWindow->Flush();
} }
} }
...@@ -352,8 +362,7 @@ void SplashScreen::updateStatus() ...@@ -352,8 +362,7 @@ void SplashScreen::updateStatus()
return; return;
if (!_bPaintProgress) if (!_bPaintProgress)
_bPaintProgress = true; _bPaintProgress = true;
pWindow->Invalidate(); pWindow->Redraw();
pWindow->Flush();
} }
// internal private methods // internal private methods
...@@ -364,7 +373,7 @@ IMPL_LINK( SplashScreen, AppEventListenerHdl, VclWindowEvent *, inEvent ) ...@@ -364,7 +373,7 @@ IMPL_LINK( SplashScreen, AppEventListenerHdl, VclWindowEvent *, inEvent )
switch ( inEvent->GetId() ) switch ( inEvent->GetId() )
{ {
case VCLEVENT_WINDOW_SHOW: case VCLEVENT_WINDOW_SHOW:
pWindow->Invalidate(); pWindow->Redraw();
break; break;
default: default:
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment