diff options
author | László Németh <laszlo.nemeth@collabora.com> | 2015-04-27 16:22:11 +0200 |
---|---|---|
committer | László Németh <laszlo.nemeth@collabora.com> | 2015-05-07 17:47:23 +0200 |
commit | a1bfad005cfb0b54744746da20a81f9bb8908ae0 (patch) | |
tree | 25004ee69d95a5a1e31c060c8b8625ac91503315 /vcl | |
parent | 96a6128b9259e62ae0b2872a3157bb1bb32d2a6d (diff) |
XTiledRenderable: use HWND instead of HDC
Cherry-picked from e1fb63bb8ed7a9bd4dbe19be0d0da7245c4a2fb2
Change-Id: I2959ea8b1213d6dade1c2567365f177bf542e075
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/gdi/salvd.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/win/source/gdi/salvd.cxx b/vcl/win/source/gdi/salvd.cxx index c76432d52da1..340e1609c2dc 100644 --- a/vcl/win/source/gdi/salvd.cxx +++ b/vcl/win/source/gdi/salvd.cxx @@ -79,7 +79,7 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics, if( pData ) { - hDC = pData->hDC; + hDC = (pData->hDC) ? pData->hDC : GetDC(pData->hWnd); hBmp = NULL; bOk = (hDC != NULL); if (bOk) @@ -137,7 +137,7 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics, pVDev->mpGraphics = pVirGraphics; pVDev->mnBitCount = nBitCount; pVDev->mbGraphics = FALSE; - pVDev->mbForeignDC = (pData != NULL); + pVDev->mbForeignDC = (pData != NULL && pData->hDC != NULL ); // insert VirDev in VirDevList pVDev->mpNext = pSalData->mpFirstVD; |