From 25e04fe6808cd1eccc6b82de7538c0f7ee78b83f Mon Sep 17 00:00:00 2001 From: Karol Szwed Date: Sat, 26 Oct 2002 14:34:46 +0000 Subject: [PATCH] Switch over to Keramik deco, (or Quartz for 8bpp visuals) svn path=/trunk/kdebase/kwin/; revision=185724 --- kcmkwin/kwindecoration/kwindecoration.cpp | 10 ++++++++-- plugins.cpp | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/kcmkwin/kwindecoration/kwindecoration.cpp b/kcmkwin/kwindecoration/kwindecoration.cpp index 4de1521df0..47a5ca8844 100644 --- a/kcmkwin/kwindecoration/kwindecoration.cpp +++ b/kcmkwin/kwindecoration/kwindecoration.cpp @@ -253,7 +253,12 @@ QString KWinDecorationModule::decorationLibName( const QString& name ) } if (libName.isEmpty()) - libName = "kwin_default"; + { + if (QPixmap::defaultDepth() > 8) + libName = "kwin_keramik"; + else + libName = "kwin_quartz"; + } return libName; } @@ -328,7 +333,8 @@ void KWinDecorationModule::readConfig( KConfig* conf ) // the current plugin library name oldLibraryName = currentLibraryName; - currentLibraryName = conf->readEntry("PluginLib", "kwin_default"); + currentLibraryName = conf->readEntry("PluginLib", + ((QPixmap::defaultDepth() > 8) ? "kwin_keramik" : "kwin_quartz")); QString decoName = decorationName( currentLibraryName ); // If we are using the "default" kde client, use the "default" entry. diff --git a/plugins.cpp b/plugins.cpp index bbaaec3d70..6da545963a 100644 --- a/plugins.cpp +++ b/plugins.cpp @@ -22,7 +22,8 @@ Copyright (C) 1999, 2000 Daniel M. Duley using namespace KWinInternal; -const char* defaultPlugin = "kwin_default"; +const char* defaultPlugin = (QPixmap::defaultDepth() > 8) ? + "kwin_keramik" : "kwin_quartz"; PluginMgr::PluginMgr()