From 5c173d7bb81b1913d59e74cf8c09971451162fd3 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 13 Oct 2004 07:57:05 +0000 Subject: INTEGRATION: CWS vcl27 (1.195.36); FILE MERGED 2004/09/17 15:09:33 pl 1.195.36.2: RESYNC: (1.195-1.199); FILE MERGED 2004/09/08 14:01:49 ssa 1.195.36.1: #i30861# #i30335# correct invalidate handling for transparent windows --- vcl/source/window/window.cxx | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'vcl/source/window/window.cxx') diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 41585c5fc6d5..eeb1488641f3 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -2,9 +2,9 @@ * * $RCSfile: window.cxx,v $ * - * $Revision: 1.199 $ + * $Revision: 1.200 $ * - * last change: $Author: obo $ $Date: 2004-09-09 16:23:08 $ + * last change: $Author: hr $ $Date: 2004-10-13 08:57:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2590,7 +2590,23 @@ void Window::ImplInvalidateFrameRegion( const Region* pRegion, USHORT nFlags ) if ( !(mnPaintFlags & IMPL_PAINT_PAINTALL) ) maInvalidateRegion.Union( *pRegion ); - ImplPostPaint(); + // Handle transparent windows correctly: invalidate must be done on the first opaque parent + if( ((IsPaintTransparent() && !(nFlags & INVALIDATE_NOTRANSPARENT)) || (nFlags & INVALIDATE_TRANSPARENT) ) + && ImplGetParent() ) + { + /* The following optimization shows problems when resizing (native) tabcontrols (eg the Help viewer) + So we pass a NULL region to the parent as well which will result in a IMPL_PAINT_PAINTALL on the parent... + + Region aWindowRegion; + if( pRegion == NULL ) + // compute real region to avoid full repaint in parent + aWindowRegion = Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + ImplGetParent()->ImplInvalidateFrameRegion( pRegion==NULL ? &aWindowRegion : pRegion, nFlags ); + */ + ImplGetParent()->ImplInvalidateFrameRegion( pRegion, nFlags ); + } + else + ImplPostPaint(); } // ----------------------------------------------------------------------- @@ -2621,7 +2637,10 @@ void Window::ImplInvalidateParentFrameRegion( Region& rRegion ) if ( mbOverlapWin ) mpFrameWindow->ImplInvalidateOverlapFrameRegion( rRegion ); else - ImplGetParent()->ImplInvalidateFrameRegion( &rRegion, INVALIDATE_CHILDREN ); + { + if( ImplGetParent() ) + ImplGetParent()->ImplInvalidateFrameRegion( &rRegion, INVALIDATE_CHILDREN ); + } } // ----------------------------------------------------------------------- -- cgit v1.2.3