From d50c63e451e3ab15fb9193db8f9d8154929937dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 8 Oct 2006 21:17:38 +0000 Subject: [PATCH] Missing part of the don't-cache-window-pixmap commit. svn path=/branches/work/kwin_composite/; revision=593732 --- composite.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/composite.cpp b/composite.cpp index a70c0bb228..c7378fb4dd 100644 --- a/composite.cpp +++ b/composite.cpp @@ -164,26 +164,13 @@ void Toplevel::finishCompositing() return; XDamageDestroy( display(), damage_handle ); damage_handle = None; - if( window_pixmap != None ) - XFreePixmap( display(), window_pixmap ); - window_pixmap = None; damage_region = QRegion(); } -void Toplevel::resetWindowPixmap() +Pixmap Toplevel::createWindowPixmap() const { - if( !compositing()) - return; - if( window_pixmap != None ) - XFreePixmap( display(), window_pixmap ); - window_pixmap = None; - } - -Pixmap Toplevel::windowPixmap() const - { - if( window_pixmap == None && compositing()) - window_pixmap = XCompositeNameWindowPixmap( display(), handle()); - return window_pixmap; + assert( compositing()); + return XCompositeNameWindowPixmap( display(), handle()); } void Toplevel::damageNotifyEvent( XDamageNotifyEvent* e )