From 05eda26865fb3d800db031aa576ba5d0f2c1df47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Fri, 28 Jan 2005 23:28:11 +0000 Subject: [PATCH] added support for unshadowed moving windows, slight changes to updates on shapable windows svn path=/trunk/kdebase/kwin/; revision=383513 --- client.cpp | 5 ++--- geometry.cpp | 4 ++-- manage.cpp | 4 +++- options.cpp | 1 + options.h | 1 + 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client.cpp b/client.cpp index 9f5e0bc669..a5e14aa21c 100644 --- a/client.cpp +++ b/client.cpp @@ -354,11 +354,11 @@ void Client::detectNoBorder() case NET::Dialog : case NET::Utility : noborder = false; + setShapable(FALSE); break; default: assert( false ); } - setShapable(FALSE); } void Client::updateFrameStrut() @@ -419,18 +419,17 @@ void Client::setUserNoBorder( bool set ) void Client::updateShape() { + setShapable(TRUE); if ( shape() ) { XShapeCombineShape(qt_xdisplay(), frameId(), ShapeBounding, clientPos().x(), clientPos().y(), window(), ShapeBounding, ShapeSet); - setShapable(TRUE); } else { XShapeCombineMask( qt_xdisplay(), frameId(), ShapeBounding, 0, 0, None, ShapeSet); - setShapable(TRUE); } // workaround for #19644 - shaped windows shouldn't have decoration if( shape() && !noBorder()) diff --git a/geometry.cpp b/geometry.cpp index d1c4c5fbcf..25ab61ecfd 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2124,7 +2124,7 @@ bool Client::startMoveResize() initialMoveResizeGeom = moveResizeGeom = geometry(); checkUnrestrictedMoveResize(); // rule out non opaque windows from useless translucency settings, maybe resizes? - if (isResize() && options->removeShadowsOnResize) + if ((isResize() && options->removeShadowsOnResize) || (isMove() && options->removeShadowsOnMove)) setShadowSize(0); if (rules()->checkMoveResizeMode( options->moveMode ) == Options::Opaque){ savedOpacity_ = opacity_; @@ -2164,7 +2164,7 @@ void Client::leaveMoveResize() // rule out non opaque windows from useless translucency settings, maybe resizes? if (rules()->checkMoveResizeMode( options->moveMode ) == Options::Opaque) setOpacity(true, savedOpacity_); - if (isResize() && options->removeShadowsOnResize) + if ((isResize() && options->removeShadowsOnResize) || (isMove() && options->removeShadowsOnMove)) updateShadowSize(); clearbound(); if (geometryTip) diff --git a/manage.cpp b/manage.cpp index 01776e0d6e..592f0fc649 100644 --- a/manage.cpp +++ b/manage.cpp @@ -309,7 +309,9 @@ bool Client::manage( Window w, bool isMapped ) { updateShape(); } - +// else +// setShapable(FALSE); + //CT extra check for stupid jdk 1.3.1. But should make sense in general // if client has initial state set to Iconic and is transient with a parent // window that is not Iconic, set init_state to Normal diff --git a/options.cpp b/options.cpp index aa9b69836a..c073dc80e7 100644 --- a/options.cpp +++ b/options.cpp @@ -186,6 +186,7 @@ unsigned long Options::updateSettings() activeWindowShadowSize = config->readNumEntry("ActiveWindowShadowSize", 100); inactiveWindowShadowSize = config->readNumEntry("InactiveWindowShadowSize", 100); dockShadowSize = config->readNumEntry("DockShadowSize", 100); + removeShadowsOnMove = config->readBoolEntry("RemoveShadowsOnMove", true); removeShadowsOnResize = config->readBoolEntry("RemoveShadowsOnResize", true); if (resetKompmgr = config->readBoolEntry("ResetKompmgr", false)) config->writeEntry("ResetKompmgr",FALSE); diff --git a/options.h b/options.h index 35cb8b4922..e6526a4c65 100644 --- a/options.h +++ b/options.h @@ -265,6 +265,7 @@ class Options : public KDecorationOptions bool translucentMovingWindows; uint movingWindowOpacity; bool removeShadowsOnResize; + bool removeShadowsOnMove; bool translucentDocks; uint dockOpacity; bool keepAboveAsActive;