From 6202c2e815246c659e225179169ebbc6c1302071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Fri, 18 Aug 2006 13:45:50 +0000 Subject: [PATCH] Differentiate properly between shape set by the window itself (which forces it to be a non-decorated window) and mask set by the decoration. svn path=/trunk/KDE/kdebase/workspace/; revision=574237 --- client.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client.cpp b/client.cpp index 6c28200205..b130a1deb3 100644 --- a/client.cpp +++ b/client.cpp @@ -264,6 +264,7 @@ void Client::updateDecoration( bool check_workspace_pos, bool force ) destroyDecoration(); if( !noBorder()) { + setMask( QRegion()); // reset shape mask decoration = workspace()->createDecoration( bridge ); // TODO check decoration's minimum size? decoration->init(); @@ -433,17 +434,15 @@ void Client::updateShape() clientPos().x(), clientPos().y(), window(), ShapeBounding, ShapeSet); } - else - { - XShapeCombineMask( display(), frameId(), ShapeBounding, 0, 0, - None, ShapeSet); - } + // !shape() mask setting is done in setMask() when the decoration + // calls it or when the decoration is created/destroyed + if( Shape::version() >= 0x11 ) // 1.1, has input shape support { // there appears to be no way to find out if a window has input // shape set or not, so always set propagate the input shape // (it's the same like the bounding shape by default) - XShapeCombineMask( display(), frameId(), ShapeInput, 0, 0, - None, ShapeSet ); + XShapeCombineShape( display(), frameId(), ShapeInput, 0, 0, + frameId(), ShapeBounding, ShapeSet ); XShapeCombineShape( display(), frameId(), ShapeInput, clientPos().x(), clientPos().y(), window(), ShapeBounding, ShapeSubtract ); @@ -479,6 +478,7 @@ void Client::setMask( const QRegion& reg, int mode ) xrects, rects.count(), ShapeSet, mode ); delete[] xrects; } + updateShape(); } QRegion Client::mask() const