diff options
Diffstat (limited to 'vcl/source/window/cursor.cxx')
-rw-r--r-- | vcl/source/window/cursor.cxx | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index 659f7df31fa7..e7542d9b07ec 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -170,9 +170,7 @@ void Cursor::ImplRestore() } } -// ----------------------------------------------------------------------- - -void Cursor::ImplShow( bool bDrawDirect, bool bRestore ) +void Cursor::ImplDoShow( bool bDrawDirect, bool bRestore ) { if ( mbVisible ) { @@ -215,9 +213,7 @@ void Cursor::ImplShow( bool bDrawDirect, bool bRestore ) } } -// ----------------------------------------------------------------------- - -bool Cursor::ImplHide() +bool Cursor::ImplDoHide( bool bSuspend ) { bool bWasCurVisible = false; if ( mpData && mpData->mpWindow ) @@ -225,11 +221,35 @@ bool Cursor::ImplHide() bWasCurVisible = mpData->mbCurVisible; if ( mpData->mbCurVisible ) ImplRestore(); + + if ( !bSuspend ) + { + mpData->maTimer.Stop(); + mpData->mpWindow = NULL; + } } return bWasCurVisible; } -// ----------------------------------------------------------------------- +void Cursor::ImplShow( bool bDrawDirect ) +{ + ImplDoShow( bDrawDirect, false ); +} + +void Cursor::ImplHide() +{ + ImplDoHide( false ); +} + +void Cursor::ImplResume( bool bRestore ) +{ + ImplDoShow( false, bRestore ); +} + +bool Cursor::ImplSuspend() +{ + return ImplDoHide( true ); +} void Cursor::ImplNew() { @@ -330,12 +350,6 @@ void Cursor::Hide() { mbVisible = sal_False; ImplHide(); - - if( mpData ) - { - mpData->maTimer.Stop(); - mpData->mpWindow = NULL; - } } } |