<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -24,6 +24,8 @@ along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
 #include &quot;options.h&quot;
 #include &quot;effects.h&quot;
 
+#include &lt;kconfiggroup.h&gt;
+
 namespace KWin
 {
 
@@ -216,7 +218,10 @@ bool Bridge::shadowsActive() const
     if( !c-&gt;workspace()-&gt;compositingActive() )
         return false;
     if( effects &amp;&amp; static_cast&lt;EffectsHandlerImpl*&gt;( effects )-&gt;isEffectLoaded( &quot;kwin4_effect_shadow&quot; ))
-        return true;
+        { // The shadow effect has a setting to disable decoration shadows, take it into account.
+        KConfigGroup conf = static_cast&lt;EffectsHandlerImpl*&gt;( effects )-&gt;effectConfig( &quot;Shadow&quot; );
+        return !conf.readEntry( &quot;forceDecoratedToDefault&quot;, false );
+        }
     return false;
     }
 </diff>
      <filename>bridge.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -74,6 +74,9 @@ void ShadowEffect::reconfigure( ReconfigureFlags )
     shadowSize = conf.readEntry( &quot;Size&quot;, 5 );
     intensifyActiveShadow = conf.readEntry( &quot;IntensifyActiveShadow&quot;, true );
     updateShadowColor();
+    forceDecorated = conf.readEntry( &quot;forceDecoratedToDefault&quot;, false );
+    forceUndecorated = conf.readEntry( &quot;forceUndecoratedToDefault&quot;, false );
+    forceOther = conf.readEntry( &quot;forceOtherToDefault&quot;, false );
 
     // Load decoration shadow related things
     bool reconfiguring = false;
@@ -275,7 +278,7 @@ void ShadowEffect::buildQuads( EffectWindow* w, WindowQuadList&amp; quadList )
         //       active and inactive shadows. Is implementing it worth
         //       the performance drop?
         int id = 0;
-        if( w-&gt;hasDecoration() )
+        if( w-&gt;hasDecoration() &amp;&amp; !forceDecorated )
             { // Decorated windows must be normal windows
             foreach( const QRect &amp;r, w-&gt;shadowQuads( ShadowBorderedActive ))
                 {
@@ -288,7 +291,7 @@ void ShadowEffect::buildQuads( EffectWindow* w, WindowQuadList&amp; quadList )
                 quadList.append( quad );
                 }
             }
-        else if( w-&gt;isNormalWindow() )
+        else if( w-&gt;isNormalWindow() &amp;&amp; !forceUndecorated )
             { // No decoration on a normal window
             foreach( const QRect &amp;r, w-&gt;shadowQuads( ShadowBorderlessActive ))
                 {
@@ -301,7 +304,7 @@ void ShadowEffect::buildQuads( EffectWindow* w, WindowQuadList&amp; quadList )
                 quadList.append( quad );
                 }
             }
-        else
+        else if( !forceOther )
             { // All other undecorated windows
             foreach( const QRect &amp;r, w-&gt;shadowQuads( ShadowOther ))
                 {</diff>
      <filename>effects/shadow.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -69,6 +69,9 @@ class ShadowEffect
         int shadowSize;
         bool intensifyActiveShadow;
         QColor shadowColor;
+        bool forceDecorated;
+        bool forceUndecorated;
+        bool forceOther;
 #ifdef KWIN_HAVE_OPENGL_COMPOSITING
         QList&lt; QList&lt;GLTexture*&gt; &gt; mShadowTextures;
         QList&lt;GLTexture*&gt; mDefaultShadowTextures;</diff>
      <filename>effects/shadow.h</filename>
    </modified>
    <modified>
      <diff>@@ -262,9 +262,6 @@
    &lt;/item&gt;
    &lt;item&gt;
     &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_3&quot; &gt;
-     &lt;property name=&quot;enabled&quot; &gt;
-      &lt;bool&gt;false&lt;/bool&gt;
-     &lt;/property&gt;
      &lt;property name=&quot;title&quot; &gt;
       &lt;string&gt;Decoration Shadows&lt;/string&gt;
      &lt;/property&gt;</diff>
      <filename>effects/shadow_config.ui</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d495a4a4b0d8753e79ff72fb3e8ff33786777e62</id>
    </parent>
  </parents>
  <author>
    <name>Lucas Murray</name>
    <email>lmurray@undefinedfire.com</email>
  </author>
  <url>http://github.com/Zarin/kwin/commit/2c68ec63a5632c8652acd1bf44acacba92aa1938</url>
  <id>2c68ec63a5632c8652acd1bf44acacba92aa1938</id>
  <committed-date>2008-11-25T01:10:52-08:00</committed-date>
  <authored-date>2008-11-25T01:10:52-08:00</authored-date>
  <message>Implement and activate shadow effect settings relating to default shadow
overrides.

git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/KDE/kdebase/workspace/kwin@888722 283d02a7-25f6-0310-bc7c-ecb5cbfe19da</message>
  <tree>9214a05ec7b409ddbfb8a6facbc3653636b50796</tree>
  <committer>
    <name>Lucas Murray</name>
    <email>lmurray@undefinedfire.com</email>
  </committer>
</commit>
