diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-07-29 18:09:32 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-07-29 18:40:39 +0200 |
commit | 79c9598d0a586f44757954556661ce6eda1f997e (patch) | |
tree | b9b9946a97b606f50dfa4eeea037d697186b4027 | |
parent | 2d4223e32628d12b9b256b532819e6cced79178e (diff) |
tdf#92982 vcl::Cursor: handle rendercontext
With this, vcl::Cursor does not paint on the vcl::Window directly, and
in case the output should be something other than pRenderContext, it
should be a one-liner change to do that.
Change-Id: I57833f6f8589286260d96f412f1fcc681e6c5c8c
-rw-r--r-- | vcl/source/window/cursor.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index 0d893cad2010..2eaa5517eade 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -44,8 +44,9 @@ struct ImplCursorData static void ImplCursorInvert( ImplCursorData* pData ) { vcl::Window* pWindow = pData->mpWindow; - bool bMapMode = pWindow->IsMapModeEnabled(); - pWindow->EnableMapMode( false ); + vcl::RenderContext* pRenderContext = pWindow->GetOutDev(); + bool bMapMode = pRenderContext->IsMapModeEnabled(); + pRenderContext->EnableMapMode( false ); InvertFlags nInvertStyle; if ( pData->mnStyle & CURSOR_SHADOW ) nInvertStyle = InvertFlags::N50; @@ -107,12 +108,12 @@ static void ImplCursorInvert( ImplCursorData* pData ) if ( pData->mnOrientation ) aPoly.Rotate( pData->maPixRotOff, pData->mnOrientation ); - pWindow->Invert( aPoly, nInvertStyle ); + pRenderContext->Invert( aPoly, nInvertStyle ); } } else - pWindow->Invert( aRect, nInvertStyle ); - pWindow->EnableMapMode( bMapMode ); + pRenderContext->Invert( aRect, nInvertStyle ); + pRenderContext->EnableMapMode( bMapMode ); } void vcl::Cursor::ImplDraw() |