From ad52844c0b6a38cccc9b43ddd607c69232c89978 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 14 Dec 2017 08:01:01 +0000 Subject: [PATCH] Remove concept of multihead in kcminit Summary: We don't remotely support multihead in plasmashell. Nor do we support two plasmashells running to fake it. SDDM doesn't either. Kwin has some code, but we don't check the screen before choosing the DBus service to use. I doubt it works well. This kills some code, and a blocking call to klauncher. (Note, multihead has nothing to do with xrandr spanning screens) Test Plan: Code grep Compiles Reviewers: #plasma, mart Reviewed By: #plasma, mart Subscribers: apol, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D9171 --- startkde/kcminit/main.cpp | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/startkde/kcminit/main.cpp b/startkde/kcminit/main.cpp index 257ee6580..6d6692b92 100644 --- a/startkde/kcminit/main.cpp +++ b/startkde/kcminit/main.cpp @@ -131,32 +131,6 @@ void KCMInit::runModules( int phase ) } } -static inline bool enableMultihead() -{ -#ifdef XCB_FOUND - if (qApp->platformName() != QLatin1String("xcb")) - return false; - - xcb_connection_t *c = xcb_connect(nullptr, nullptr); - if (!c || xcb_connection_has_error(c)) - return false; - - //on a common setup of laptop plus external vga output this still will be 1 - const int xcb_screen_count = xcb_setup_roots_length(xcb_get_setup(c)); - xcb_disconnect(c); - - if (xcb_screen_count <= 1) - return false; - - KConfig _config( QStringLiteral("kcmdisplayrc") ); - KConfigGroup config(&_config, "X11"); - // This key has no GUI apparently - return !config.readEntry( "disableMultihead", false); -#else - return false; -#endif -} - KCMInit::KCMInit( const QCommandLineParser& args ) { QString arg; @@ -192,14 +166,6 @@ KCMInit::KCMInit( const QCommandLineParser& args ) list = KServiceTypeTrader::self()->query( QStringLiteral("KCModuleInit") ); } - // Pass env. var to kdeinit. - const char* name = "KDE_MULTIHEAD"; - const char* value = enableMultihead() ? "true" : "false"; - OrgKdeKLauncherInterface *iface = new OrgKdeKLauncherInterface(QStringLiteral("org.kde.klauncher5"), QStringLiteral("/KLauncher"), QDBusConnection::sessionBus()); - iface->setLaunchEnv(QLatin1String(name), QLatin1String(value)); - iface->deleteLater(); - setenv( name, value, 1 ); // apply effect also to itself - if( startup ) { runModules( 0 ); // Tell KSplash that KCMInit has started