diff --git a/kcmkwin/kwincompositing/CMakeLists.txt b/kcmkwin/kwincompositing/CMakeLists.txt index e3fb0dbe46..e333ca54e5 100644 --- a/kcmkwin/kwincompositing/CMakeLists.txt +++ b/kcmkwin/kwincompositing/CMakeLists.txt @@ -5,7 +5,9 @@ include_directories( ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin ) set(kcm_kwincompositing_PART_SRCS advanced.cpp main.cpp - ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/compositingprefs.cpp ) + ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/compositingprefs.cpp + ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/lib/kwinglobals.cpp + ) kde4_add_ui_files(kcm_kwincompositing_PART_SRCS advanced.ui main.ui) kde4_add_plugin(kcm_kwincompositing ${kcm_kwincompositing_PART_SRCS}) target_link_libraries(kcm_kwincompositing ${KDE4_KUTILS_LIBS}) @@ -20,6 +22,21 @@ if(OPENGL_FOUND) target_link_libraries(kcm_kwincompositing ${DL_LIBRARY}) endif(DL_LIBRARY) endif(OPENGL_FOUND) +if (X11_Xrender_FOUND) + target_link_libraries(kcm_kwincompositing ${X11_Xrender_LIB}) +endif (X11_Xrender_FOUND) +if (X11_Xrandr_FOUND) + target_link_libraries(kcm_kwincompositing ${X11_Xrandr_LIB}) +endif (X11_Xrandr_FOUND) +if (X11_Xcomposite_FOUND) + target_link_libraries(kcm_kwincompositing ${X11_Xcomposite_LIB}) +endif (X11_Xcomposite_FOUND) +if (X11_Xdamage_FOUND) + target_link_libraries(kcm_kwincompositing ${X11_Xdamage_LIB}) +endif (X11_Xdamage_FOUND) +if (X11_Xfixes_FOUND) + target_link_libraries(kcm_kwincompositing ${X11_Xfixes_LIB}) +endif (X11_Xfixes_FOUND) ########### install files ############### diff --git a/kcmkwin/kwincompositing/main.cpp b/kcmkwin/kwincompositing/main.cpp index 4e96e3a23f..cce6a933d7 100644 --- a/kcmkwin/kwincompositing/main.cpp +++ b/kcmkwin/kwincompositing/main.cpp @@ -77,10 +77,6 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList ui.setupUi(this); ui.tabWidget->setCurrentIndex(0); - // Driver-specific config detection - mDefaultPrefs.detect(); - - connect(ui.advancedOptions, SIGNAL(clicked()), this, SLOT(showAdvancedOptions())); connect(ui.useCompositing, SIGNAL(toggled(bool)), this, SLOT(compositingEnabled(bool))); connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int))); @@ -101,10 +97,22 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList mTmpConfigFile.open(); mTmpConfig = KSharedConfig::openConfig(mTmpConfigFile.fileName()); - initEffectSelector(); + if( CompositingPrefs::compositingPossible() ) + { + // Driver-specific config detection + mDefaultPrefs.detect(); - // Load config - load(); + initEffectSelector(); + + // Load config + load(); + } + else + { + ui.useCompositing->setEnabled(false); + ui.useCompositing->setChecked(false); + compositingEnabled(false); + } KAboutData *about = new KAboutData(I18N_NOOP("kcmkwincompositing"), 0, ki18n("KWin Desktop Effects Configuration Module"),