From 275cf05184bf4ed29b2e4b1d18617b82ecc5b040 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Mon, 4 Apr 2011 09:42:11 +0200 Subject: [PATCH] make sure Shadow X11 property is not set on decorated windows, since it is handled by the decoration itself (and therefore should not be by kwin). --- clients/oxygen/oxygenclient.cpp | 24 +++++++++++++++++++++++- clients/oxygen/oxygenclient.h | 7 +++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index b3a1212dda..dd9c052484 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -42,8 +42,12 @@ #include #include #include +#include #include +#include +#include + namespace Oxygen { @@ -59,7 +63,8 @@ namespace Oxygen _forceActive( false ), _mouseButton( Qt::NoButton ), _itemData( this ), - _sourceItem( -1 ) + _sourceItem( -1 ), + _shadowAtom( 0 ) {} //___________________________________________ @@ -167,6 +172,9 @@ namespace Oxygen } else if( hasSizeGrip() ) deleteSizeGrip(); + // needs to remove shadow property on window since shadows are handled by the decoration + removeShadowHint(); + } //___________________________________________ @@ -1827,4 +1835,18 @@ namespace Oxygen _sizeGrip = 0; } + //_________________________________________________________________ + void Client::removeShadowHint( void ) + { + + // do nothing if no window id + if( !windowId() ) return; + + // create atom + if( !_shadowAtom ) + { _shadowAtom = XInternAtom( QX11Info::display(), "_KDE_NET_WM_SHADOW", False); } + + XDeleteProperty(QX11Info::display(), windowId(), _shadowAtom); + } + } diff --git a/clients/oxygen/oxygenclient.h b/clients/oxygen/oxygenclient.h index e65873392c..088c40f995 100644 --- a/clients/oxygen/oxygenclient.h +++ b/clients/oxygen/oxygenclient.h @@ -41,6 +41,7 @@ #include #include +#include namespace Oxygen { @@ -398,6 +399,9 @@ namespace Oxygen //@} + //! remove shadow hint + void removeShadowHint( void ); + protected slots: //! set target item to -1 @@ -459,6 +463,9 @@ namespace Oxygen */ QBasicTimer _dragStartTimer; + //! shadow atom + Atom _shadowAtom; + }; } // namespace Oxygen