diff options
author | Dennis Kasprzyk <onestone@opencompositing.org> | 2008-02-01 04:10:44 +0100 |
---|---|---|
committer | Dennis kasprzyk <onestone@opencompositing.org> | 2008-02-01 04:10:44 +0100 |
commit | a0d236e2cc09985d3f6c417dc1468944959c920f (patch) | |
tree | 440a951bab4d4e2bf2663d27d6b275df2859ac8e /kde/window-decorator-kde4 | |
parent | 3c1c706346a76009ddae7fb13ba022b7b80a97f2 (diff) |
Watch for plasma theme changes.
Diffstat (limited to 'kde/window-decorator-kde4')
-rw-r--r-- | kde/window-decorator-kde4/decorator.cpp | 15 | ||||
-rw-r--r-- | kde/window-decorator-kde4/decorator.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/kde/window-decorator-kde4/decorator.cpp b/kde/window-decorator-kde4/decorator.cpp index 91eb7aab..052e3c94 100644 --- a/kde/window-decorator-kde4/decorator.cpp +++ b/kde/window-decorator-kde4/decorator.cpp @@ -26,6 +26,7 @@ #include <KDE/KGlobal> #include <kwindowsystem.h> #include <KDE/KLocale> +#include <KDE/Plasma/Theme> #include <kcommondecoration.h> #include <kwindowsystem.h> @@ -236,6 +237,9 @@ KWD::Decorator::enableDecorations (Time timestamp, connect (&mIdleTimer, SIGNAL (timeout ()), SLOT (processDamage ())); + connect (Plasma::Theme::self (), SIGNAL (changed ()), + SLOT (plasmaThemeChanged ())); + // select for client messages XSelectInput (QX11Info::display(), QX11Info::appRootWindow(), StructureNotifyMask | PropertyChangeMask); @@ -983,3 +987,14 @@ KWD::Decorator::shadowColorChanged (QString value) changeShadowOptions (&opt); } + +void +KWD::Decorator::plasmaThemeChanged () +{ + if (mSwitcher) + { + WId win = mSwitcher->xid(); + delete mSwitcher; + mSwitcher = new Switcher (mCompositeWindow, win); + } +} diff --git a/kde/window-decorator-kde4/decorator.h b/kde/window-decorator-kde4/decorator.h index 1055517d..65802c47 100644 --- a/kde/window-decorator-kde4/decorator.h +++ b/kde/window-decorator-kde4/decorator.h @@ -153,6 +153,8 @@ class Decorator:public KApplication { void shadowYOffsetChanged (int value); void shadowColorChanged (QString value); + void plasmaThemeChanged (); + private: static PluginManager *mPlugins; static KWD::Options *mOptions; |