From 5d0f9b66ddc6224367a072407642db061520de5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 2 Jul 2008 10:11:16 +0000 Subject: [PATCH] Fix last commit. svn path=/trunk/KDE/kdebase/workspace/; revision=827111 --- composite.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/composite.cpp b/composite.cpp index 0a5aab41b8..b1e37b1f85 100644 --- a/composite.cpp +++ b/composite.cpp @@ -478,24 +478,19 @@ Pixmap Toplevel::createWindowPixmap() assert( compositing()); grabXServer(); KXErrorHandler err; - Pixmap pix = XCompositeNameWindowPixmap( display(), frameId()); + window_pix = XCompositeNameWindowPixmap( display(), frameId()); // check that the received pixmap is valid and actually matches what we // know about the window (i.e. size) XWindowAttributes attrs; - if( !XGetWindowAttributes( display(), frameId(), &attrs )) - window_pix = None; - if( err.error( false )) - window_pix = None; - if( attrs.width != width() || attrs.height != height() || attrs.map_state != IsViewable ) - window_pix = None; - ungrabXServer(); - if( window_pix == None || pix == None ) + if( !XGetWindowAttributes( display(), frameId(), &attrs ) + || err.error( false ) + || attrs.width != width() || attrs.height != height() || attrs.map_state != IsViewable ) { kDebug( 1212 ) << "Creating window pixmap failed: " << this; - if( pix != None ) - XFreePixmap( display(), pix ); + XFreePixmap( display(), window_pix ); + window_pix = None; } - window_pix = pix; + ungrabXServer(); return window_pix; #else return None;