summaryrefslogtreecommitdiff
path: root/kde/window-decorator
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-09-05 14:20:57 +0200
committerDanny Baumann <dannybaumann@web.de>2007-09-05 14:20:57 +0200
commite4091e70f45e2fb88c4d500e1f2b7f16f4c8215a (patch)
tree6260440089594c250d927d817f28c8e4b5283b9e /kde/window-decorator
parent15c926a6d7b2c152d861a0c5f93082254317ffff (diff)
Only assign the default shadow to windows which use default decorations.
If we use the default shadow for other windows (such as maximized or utility ones), the decoration context doesn't match the border, leading to corrupted display of the decorations for this window.
Diffstat (limited to 'kde/window-decorator')
-rw-r--r--kde/window-decorator/decorator.cpp2
-rw-r--r--kde/window-decorator/decorator.h7
-rw-r--r--kde/window-decorator/window.cpp2
-rw-r--r--kde/window-decorator/window.h4
4 files changed, 13 insertions, 2 deletions
diff --git a/kde/window-decorator/decorator.cpp b/kde/window-decorator/decorator.cpp
index 937038e9..4dc23f44 100644
--- a/kde/window-decorator/decorator.cpp
+++ b/kde/window-decorator/decorator.cpp
@@ -64,6 +64,7 @@ bool activeDecorationOpacityShade = false;
int blurType = BLUR_TYPE_NONE;
decor_context_t KWD::Decorator::mDefaultContext;
+decor_extents_t KWD::Decorator::mDefaultBorder;
decor_shadow_t *KWD::Decorator::mNoBorderShadow = 0;
decor_shadow_t *KWD::Decorator::mDefaultShadow = 0;
KWD::PluginManager *KWD::Decorator::mPlugins = 0;
@@ -350,6 +351,7 @@ KWD::Decorator::updateDefaultShadow (KWD::Window *w)
return;
mDefaultContext = *w->context ();
+ mDefaultBorder = *w->border ();
mDefaultShadow = w->shadow ();
if (mDefaultShadow)
diff --git a/kde/window-decorator/decorator.h b/kde/window-decorator/decorator.h
index e56dfdce..1453844b 100644
--- a/kde/window-decorator/decorator.h
+++ b/kde/window-decorator/decorator.h
@@ -111,11 +111,15 @@ class Decorator:public KApplication, public KWinInterface {
{
return &mShadowOptions;
}
- static decor_shadow_t *defaultWindowShadow (decor_context_t *context)
+ static decor_shadow_t *defaultWindowShadow (decor_context_t *context,
+ decor_extents_t *border)
{
if (!mDefaultShadow)
return NULL;
+ if (memcmp (border, &mDefaultBorder, sizeof (decor_extents_t)) != 0)
+ return NULL;
+
*context = mDefaultContext;
return mDefaultShadow;
}
@@ -152,6 +156,7 @@ class Decorator:public KApplication, public KWinInterface {
private:
static PluginManager *mPlugins;
static KWD::Options *mOptions;
+ static decor_extents_t mDefaultBorder;
static decor_context_t mDefaultContext;
static decor_shadow_t *mDefaultShadow;
static decor_shadow_t *mNoBorderShadow;
diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp
index 7e07eab2..a9e77d72 100644
--- a/kde/window-decorator/window.cpp
+++ b/kde/window-decorator/window.cpp
@@ -932,7 +932,7 @@ KWD::Window::updateShadow (void)
/* use default shadow if such exist */
if (!mUniqueHorzShape && !mUniqueVertShape)
{
- mShadow = Decorator::defaultWindowShadow (&mContext);
+ mShadow = Decorator::defaultWindowShadow (&mContext, &mBorder);
if (mShadow)
decor_shadow_reference (mShadow);
}
diff --git a/kde/window-decorator/window.h b/kde/window-decorator/window.h
index ef7b79f9..8472677c 100644
--- a/kde/window-decorator/window.h
+++ b/kde/window-decorator/window.h
@@ -166,6 +166,10 @@ class Window:public QWidget, public KDecorationBridge {
{
return mShadow;
}
+ decor_extents_t *border (void)
+ {
+ return &mBorder;
+ }
QRect clientGeometry (void);
void showKillProcessDialog (Time timestamp);
void hideKillProcessDialog (void);