From 5803fa23539f617b36283f425175751b3592dae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 27 Apr 2012 09:27:50 +0200 Subject: [PATCH] Drop CompositingPrefs detection from screenedges kcm CompositingPrefs have only be used to get the default value when reading whether the Compositing Enabled config option. But CompositingPrefs always returns true which makes it useless to create an OpenGL context for this. REVIEW: 104752 --- kcmkwin/kwinscreenedges/CMakeLists.txt | 33 -------------------------- kcmkwin/kwinscreenedges/main.cpp | 3 +-- kcmkwin/kwinscreenedges/main.h | 2 -- 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/kcmkwin/kwinscreenedges/CMakeLists.txt b/kcmkwin/kwinscreenedges/CMakeLists.txt index cecff7c4aa..a1245954b4 100644 --- a/kcmkwin/kwinscreenedges/CMakeLists.txt +++ b/kcmkwin/kwinscreenedges/CMakeLists.txt @@ -4,43 +4,10 @@ set( kcm_kwinscreenedges_PART_SRCS main.cpp monitor.cpp - ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/compositingprefs.cpp - ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/libkwineffects/kwinglobals.cpp - ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/libkwineffects/kwinglplatform.cpp ) kde4_add_ui_files( kcm_kwinscreenedges_PART_SRCS main.ui ) kde4_add_plugin( kcm_kwinscreenedges ${kcm_kwinscreenedges_PART_SRCS} ) target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES} kworkspace ${KDE4_PLASMA_LIBS}) install( TARGETS kcm_kwinscreenedges DESTINATION ${PLUGIN_INSTALL_DIR} ) -# CompositingPrefs uses OpenGL -if( OPENGL_FOUND ) - target_link_libraries( kcm_kwinscreenedges kwinglutils ${OPENGL_gl_LIBRARY} ) - set_target_properties(kcm_kwinscreenedges PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGL) -# -ldl used by OpenGL code - find_library( DL_LIBRARY dl ) - if( DL_LIBRARY ) - target_link_libraries( kcm_kwinscreenedges ${DL_LIBRARY} ) - endif( DL_LIBRARY ) -endif( OPENGL_FOUND ) -if(OPENGLES_FOUND) - target_link_libraries(kcm_kwinscreenedges kwinglesutils ${OPENGLES_LIBRARIES}) - set_target_properties(kcm_kwinscreenedges PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") -endif(OPENGLES_FOUND) -if( X11_Xrender_FOUND ) - target_link_libraries( kcm_kwinscreenedges ${X11_Xrender_LIB} ) -endif( X11_Xrender_FOUND ) -if( X11_Xrandr_FOUND ) - target_link_libraries( kcm_kwinscreenedges ${X11_Xrandr_LIB} ) -endif( X11_Xrandr_FOUND ) -if( X11_Xcomposite_FOUND ) - target_link_libraries( kcm_kwinscreenedges ${X11_Xcomposite_LIB} ) -endif( X11_Xcomposite_FOUND ) -if( X11_Xdamage_FOUND ) - target_link_libraries( kcm_kwinscreenedges ${X11_Xdamage_LIB} ) -endif( X11_Xdamage_FOUND ) -if( X11_Xfixes_FOUND ) - target_link_libraries( kcm_kwinscreenedges ${X11_Xfixes_LIB} ) -endif( X11_Xfixes_FOUND ) - install( FILES kwinscreenedges.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) diff --git a/kcmkwin/kwinscreenedges/main.cpp b/kcmkwin/kwinscreenedges/main.cpp index 9f56b362f0..2f463c7d7c 100644 --- a/kcmkwin/kwinscreenedges/main.cpp +++ b/kcmkwin/kwinscreenedges/main.cpp @@ -64,7 +64,6 @@ KWinScreenEdgesConfig::KWinScreenEdgesConfig(QWidget* parent, const QVariantList connect(m_ui->quickMaximizeBox, SIGNAL(stateChanged(int)), this, SLOT(groupChanged())); connect(m_ui->quickTileBox, SIGNAL(stateChanged(int)), this, SLOT(groupChanged())); - m_defaultPrefs.detect(); // Driver-specific config detection load(); } @@ -412,7 +411,7 @@ void KWinScreenEdgesConfig::monitorShowEvent() { // Check if they are enabled KConfigGroup config(m_config, "Compositing"); - if (config.readEntry("Enabled", m_defaultPrefs.recommendCompositing())) { + if (config.readEntry("Enabled", true)) { // Compositing enabled config = KConfigGroup(m_config, "Plugins"); diff --git a/kcmkwin/kwinscreenedges/main.h b/kcmkwin/kwinscreenedges/main.h index c69b213df6..d2e9a24671 100644 --- a/kcmkwin/kwinscreenedges/main.h +++ b/kcmkwin/kwinscreenedges/main.h @@ -25,7 +25,6 @@ along with this program. If not, see . #include #include "kwinglobals.h" -#include "compositingprefs.h" #include "ui_main.h" @@ -61,7 +60,6 @@ protected: private: KWinScreenEdgesConfigForm* m_ui; KSharedConfigPtr m_config; - CompositingPrefs m_defaultPrefs; enum EffectActions { PresentWindowsAll = ELECTRIC_ACTION_COUNT, // Start at the end of built in actions