From 95711f5b9e7b6a982d1762d37d5a38e0f40b86f9 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Fri, 25 Apr 2014 02:23:22 +1000 Subject: fdo#74702 Move ImplInitClipRegion Window code out of OutputDevice Window instances need to handle overlapped window clipping, VirtualDevice and Printer do not have to worry about this. This code should be kept in the class that handles it, so I'm seperating it out. Change-Id: Ie7df90c983f7a858b563d4f892ceb64d575c0319 --- vcl/source/window/window.cxx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'vcl/source/window/window.cxx') diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index cf53f2ae3bff..9fe3df56c1b7 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -406,6 +406,39 @@ bool Window::AcquireGraphics() const return mpGraphics ? true : false; } +void Window::ImplInitClipRegion() +{ + DBG_TESTSOLARMUTEX(); + + Region aRegion; + + // Put back backed up background + if ( mpWindowImpl->mpFrameData->mpFirstBackWin ) + ImplInvalidateAllOverlapBackgrounds(); + if ( mpWindowImpl->mbInPaint ) + aRegion = *(mpWindowImpl->mpPaintRegion); + else + { + aRegion = *(ImplGetWinChildClipRegion()); + // --- RTL -- only this region is in frame coordinates, so re-mirror it + // the mpWindowImpl->mpPaintRegion above is already correct (see ImplCallPaint()) ! + if( ImplIsAntiparallel() ) + ReMirror ( aRegion ); + } + if ( mbClipRegion ) + aRegion.Intersect( ImplPixelToDevicePixel( maRegion ) ); + if ( aRegion.IsEmpty() ) + mbOutputClipped = true; + else + { + mbOutputClipped = false; + ImplSelectClipRegion( aRegion ); + } + mbClipRegionSet = true; + + mbInitClipRegion = false; +} + void Window::EnableRTL ( bool bEnable ) { StateChanged( STATE_CHANGE_MIRRORING ); -- cgit