diff options
author | Andreas Sturmlechner <andreas.sturmlechner@gmail.com> | 2016-07-26 18:02:43 +0200 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2016-07-28 00:20:12 +1000 |
commit | bbc537ce8c7c2e6e9f8b986deb14ae06d2e50502 (patch) | |
tree | 17a553b21d9af50e7bddff198c2748bd8fb80c82 /kde-plasma | |
parent | media-libs/mlt: revision bump with various fixes (diff) | |
download | gentoo-bbc537ce8c7c2e6e9f8b986deb14ae06d2e50502.tar.gz gentoo-bbc537ce8c7c2e6e9f8b986deb14ae06d2e50502.tar.bz2 gentoo-bbc537ce8c7c2e6e9f8b986deb14ae06d2e50502.zip |
kde-plasma/libkscreen: Fix load KScreen config at startup and crash on close
Reported-by: uraes (Gentoo Forums)
See also: https://forums.gentoo.org/viewtopic-p-7948292.html
Package-Manager: portage-2.2.28
Diffstat (limited to 'kde-plasma')
3 files changed, 139 insertions, 0 deletions
diff --git a/kde-plasma/libkscreen/files/libkscreen-5.6.5-config-fix.patch b/kde-plasma/libkscreen/files/libkscreen-5.6.5-config-fix.patch new file mode 100644 index 000000000000..3455f6352ab9 --- /dev/null +++ b/kde-plasma/libkscreen/files/libkscreen-5.6.5-config-fix.patch @@ -0,0 +1,32 @@ +commit 3cd70aa1cef0b4aab8c13bba049e5b1ccd6ae1ab +Author: Kai Uwe Broulik <kde@privat.broulik.de> +Date: Thu Jun 2 10:39:02 2016 +0200 + + [Backend Manager] emitBackendReady() only after fetching the config finishes + + Without a valid config in the BackendManager, KScreen::Config::canBeApplied always + returns false sometimes causing KScreen to ignore stored config on startup. + Wait until we have a config before telling that the backend is ready. + + REVIEW: 128074 + +diff --git a/src/backendmanager.cpp b/src/backendmanager.cpp +index 570f575..676bb5d 100644 +--- a/src/backendmanager.cpp ++++ b/src/backendmanager.cpp +@@ -353,14 +353,13 @@ void BackendManager::onBackendRequestDone(QDBusPendingCallWatcher *watcher) + connect(new GetConfigOperation(GetConfigOperation::NoEDID), &GetConfigOperation::finished, + [&](ConfigOperation *op) { + mConfig = qobject_cast<GetConfigOperation*>(op)->config(); ++ emitBackendReady(); + }); + // And listen for its change. + connect(mInterface, &org::kde::kscreen::Backend::configChanged, + [&](const QVariantMap &newConfig) { + mConfig = KScreen::ConfigSerializer::deserializeConfig(newConfig); + }); +- +- emitBackendReady(); + } + + void BackendManager::backendServiceUnregistered(const QString &serviceName) diff --git a/kde-plasma/libkscreen/files/libkscreen-5.6.5-fix-crash.patch b/kde-plasma/libkscreen/files/libkscreen-5.6.5-fix-crash.patch new file mode 100644 index 000000000000..71dc5f3f236a --- /dev/null +++ b/kde-plasma/libkscreen/files/libkscreen-5.6.5-fix-crash.patch @@ -0,0 +1,66 @@ +commit a0219e9d8292b70ac3ffa632a9c48cdcee44c9fb +Author: Sebastian Kügler <sebas@kde.org> +Date: Tue Jun 7 14:35:11 2016 +0200 + + Fix crasher on application quit, bump Qt dep to 5.4 + + Something changed inside QScreen, and now we get invalid objects during + teardown, where they previously were still accessible. Qt has "new" API + as of 5.4 so use that and prevent the crash from happening. + + REVIEWED-BY:Aleix Pol + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9c834d9..1f6f890 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,7 +16,7 @@ include(ECMQtDeclareLoggingCategory) + include(FeatureSummary) + include(CheckCXXCompilerFlag) + +-set(REQUIRED_QT_VERSION 5.2.0) ++set(REQUIRED_QT_VERSION 5.4.0) + find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core DBus Gui Test X11Extras) + + # Wayland backend +diff --git a/backends/qscreen/qscreenconfig.cpp b/backends/qscreen/qscreenconfig.cpp +index c3c69db..156d973 100644 +--- a/backends/qscreen/qscreenconfig.cpp ++++ b/backends/qscreen/qscreenconfig.cpp +@@ -39,6 +39,7 @@ QScreenConfig::QScreenConfig(QObject *parent) + } + m_blockSignals = false; + connect(qApp, &QGuiApplication::screenAdded, this, &QScreenConfig::screenAdded); ++ connect(qApp, &QGuiApplication::screenRemoved, this, &QScreenConfig::screenRemoved); + } + + QScreenConfig::~QScreenConfig() +@@ -75,14 +76,12 @@ void QScreenConfig::screenAdded(const QScreen *qscreen) + qscreenoutput->setId(outputId(qscreen)); + m_outputMap.insert(qscreenoutput->id(), qscreenoutput); + +- connect(qscreen, &QObject::destroyed, this, &QScreenConfig::screenDestroyed); +- + if (!m_blockSignals) { + Q_EMIT configChanged(toKScreenConfig()); + } + } + +-void QScreenConfig::screenDestroyed(QObject *qscreen) ++void QScreenConfig::screenRemoved(QScreen *qscreen) + { + qCDebug(KSCREEN_QSCREEN) << "Screen removed" << qscreen << QGuiApplication::screens().count(); + // Find output matching the QScreen object and remove it +diff --git a/backends/qscreen/qscreenconfig.h b/backends/qscreen/qscreenconfig.h +index 1dfcc95..2c80eed 100644 +--- a/backends/qscreen/qscreenconfig.h ++++ b/backends/qscreen/qscreenconfig.h +@@ -45,7 +45,7 @@ public: + + private Q_SLOTS: + void screenAdded(const QScreen *qscreen); +- void screenDestroyed(QObject *qscreen = 0); ++ void screenRemoved(QScreen *qscreen); + + Q_SIGNALS: + void configChanged(const KScreen::ConfigPtr &config); diff --git a/kde-plasma/libkscreen/libkscreen-5.6.5-r1.ebuild b/kde-plasma/libkscreen/libkscreen-5.6.5-r1.ebuild new file mode 100644 index 000000000000..cbdb889cf442 --- /dev/null +++ b/kde-plasma/libkscreen/libkscreen-5.6.5-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +KDE_TEST="forceoptional" +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Plasma screen management library" +SLOT="5/7" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="X" + +DEPEND=" + $(add_frameworks_dep kwayland) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui) + $(add_qt_dep qtx11extras) + X? ( x11-libs/libxcb ) +" +RDEPEND="${DEPEND} + !x11-libs/libkscreen:5 +" + +PATCHES=( + "${FILESDIR}/${P}-config-fix.patch" + "${FILESDIR}/${P}-fix-crash.patch" +) + +# requires running session +RESTRICT="test" + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_find_package X XCB) + ) + + kde5_src_configure +} |