File kdelibs-fix-containment.patch of Package kdelibs4
Index: plasma/containment.cpp
===================================================================
--- plasma/containment.cpp (révision 1074635)
+++ plasma/containment.cpp (copie de travail)
@@ -56,6 +56,7 @@
#include "extenderitem.h"
#include "svg.h"
#include "wallpaper.h"
+#include "theme.h"
#include "remote/accessappletjob.h"
#include "remote/accessmanager.h"
@@ -1823,7 +1824,18 @@
{
d->drawWallpaper = drawWallpaper;
if (drawWallpaper) {
- KConfigGroup cfg = config();
+ Plasma::Theme theme;
+ QString UsedTheme = theme.themeName() ;
+ // load the wallpaper mode , if any
+ const QString metadataPath(KStandardDirs::locate("data", "desktoptheme/" + UsedTheme + "/metadata.desktop"));
+ KConfig metadata(metadataPath);
+ KConfigGroup cfg ;
+ if (metadata.hasGroup("Wallpaper")) {
+ cfg = KConfigGroup(&metadata, "Wallpaper");
+ } else {
+ cfg = config();
+ }
+
const QString wallpaper = cfg.readEntry("wallpaperplugin", defaultWallpaper);
const QString mode = cfg.readEntry("wallpaperpluginmode", defaultWallpaperMode);
setWallpaper(wallpaper, mode);