summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-03-07 17:16:55 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2018-03-08 18:52:35 +0100
commit06d09fdf75edaa94767013e23ddb677812bf2be6 (patch)
treec607508ff0a9aef845f4e57ea9e16bd9b5661169 /vcl/inc
parenta1b3ae95e35fe0669bcc9df020fa606e6a3cca75 (diff)
tdf#115420 WIN clean up WinSalFrames DC handling
We still don't return a SalGraphics object from AcquireGraphics without a valid DC. But internally we keep the WinSalGraphics objects around, so we now have to verify the DC before using it. In the end this also fixes the leak of the threaded SalGraphics of the frame. Change-Id: I267c96c04b7d00cb66a6c84c63d1373ebe0f529f Reviewed-on: https://gerrit.libreoffice.org/50908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit c15ea73f960bbd3d2a4b0c43b467ac62eeba3505) Conflicts: vcl/win/window/salframe.cxx Also includes the following patch: WIN rename SalFrames SalGraphics pointers This renames mpGraphics => mpLocalGraphics and mpGraphics2 to mpThreadGraphics. Change-Id: I649b956abc9587f1be74872d439fefc5f5b21135 Reviewed-on: https://gerrit.libreoffice.org/50907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 352bd98892c1cdf95756a49f38c84212eebffd7b) Reviewed-on: https://gerrit.libreoffice.org/50958 Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/win/salframe.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 3ee87512c9cc..77902a40034e 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -33,8 +33,8 @@ public:
HWND mhWnd; // Window handle
HCURSOR mhCursor; // cursor handle
HIMC mhDefIMEContext; // default IME-Context
- WinSalGraphics* mpGraphics; // current frame graphics
- WinSalGraphics* mpGraphics2; // current frame graphics for other threads
+ WinSalGraphics* mpLocalGraphics; // current local frame graphics
+ WinSalGraphics* mpThreadGraphics; // current frame graphics for other threads
WinSalFrame* mpNextFrame; // pointer to next frame
HMENU mSelectedhMenu; // the menu where highlighting is currently going on
HMENU mLastActivatedhMenu; // the menu that was most recently opened
@@ -82,6 +82,12 @@ public:
bool mbPropertiesStored; // has values stored in the window property store
void updateScreenNumber();
+
+private:
+ void ImplSetParentFrame( HWND hNewParentWnd, bool bAsChild );
+ bool InitFrameGraphicsDC( WinSalGraphics *pGraphics, HDC hDC, HWND hWnd );
+ bool ReleaseFrameGraphicsDC( WinSalGraphics* pGraphics );
+
public:
WinSalFrame();
virtual ~WinSalFrame() override;