diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2022-05-30 17:25:40 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2022-05-30 18:09:03 +0200 |
commit | 591b28d3c215f9bab4ee3cc77087191b3403a08a (patch) | |
tree | d3bdb2a71b6a79d20065a266ea8cad44b9fefffb /kde-plasma/kscreen | |
parent | kde-frameworks/knewstuff: Drop 5.94.0 (diff) | |
download | gentoo-591b28d3c215f9bab4ee3cc77087191b3403a08a.tar.gz gentoo-591b28d3c215f9bab4ee3cc77087191b3403a08a.tar.bz2 gentoo-591b28d3c215f9bab4ee3cc77087191b3403a08a.zip |
kde-plasma/kscreen: X11: fix kded xcb resource leak
Upstream commit 93cfd297506e4106a7b6e7bcc649442c5bf0f7d1
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=453280
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/kscreen')
-rw-r--r-- | kde-plasma/kscreen/files/kscreen-5.24.5-fix-kded-xcb-resources-leak.patch | 61 | ||||
-rw-r--r-- | kde-plasma/kscreen/kscreen-5.24.5-r2.ebuild | 53 |
2 files changed, 114 insertions, 0 deletions
diff --git a/kde-plasma/kscreen/files/kscreen-5.24.5-fix-kded-xcb-resources-leak.patch b/kde-plasma/kscreen/files/kscreen-5.24.5-fix-kded-xcb-resources-leak.patch new file mode 100644 index 000000000000..ecba1664c51c --- /dev/null +++ b/kde-plasma/kscreen/files/kscreen-5.24.5-fix-kded-xcb-resources-leak.patch @@ -0,0 +1,61 @@ +From 93cfd297506e4106a7b6e7bcc649442c5bf0f7d1 Mon Sep 17 00:00:00 2001 +From: Stefan Becker <chemobejk@gmail.com> +Date: Sun, 29 May 2022 23:33:55 +0300 +Subject: [PATCH] X11: fix kded xcb resource leak + +This fixes commit 579358f501ae978aa527a25eb3ef9dd42557db46 + +XOpenDisplay() internally calls xcb_connect(), creating a new XCB client +connection. This means that on every KScreen configuration change event +the kded5 process creates a new connection until XCB runs into the hard +limit of 256 of clients, leading to the dreaded "Maximum number of +clients reached" error. + +Re-use the display from QX11Info instead of calling XOpenDisplay(). + +BUG: 453280 + + +(cherry picked from commit 0270a49328aa70b14dd08e2ed5a425ca3f8e4fd5) +--- + kded/daemon.cpp | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/kded/daemon.cpp b/kded/daemon.cpp +index e8ed4ac..443d98d 100644 +--- a/kded/daemon.cpp ++++ b/kded/daemon.cpp +@@ -361,6 +361,14 @@ void KScreenDaemon::alignX11TouchScreen() + if (qGuiApp->platformName() != QStringLiteral("xcb")) { + return; + } ++ auto *display = QX11Info::display(); ++ if (!display) { ++ return; ++ } ++ auto *connection = QX11Info::connection(); ++ if (!connection) { ++ return; ++ } + + const QRect totalRect(QPoint(0, 0), m_monitoredConfig->data()->screen()->currentSize()); + QRect internalOutputRect; +@@ -411,15 +419,6 @@ void KScreenDaemon::alignX11TouchScreen() + break; + } + +- auto *display = XOpenDisplay(nullptr); +- if (!display) { +- return; +- } +- auto *connection = QX11Info::connection(); +- if (!connection) { +- return; +- } +- + auto getAtom = [](xcb_connection_t *connection, const char *name) { + auto cookie = xcb_intern_atom(connection, true, strlen(name), name); + auto reply = xcb_intern_atom_reply(connection, cookie, nullptr); +-- +GitLab + diff --git a/kde-plasma/kscreen/kscreen-5.24.5-r2.ebuild b/kde-plasma/kscreen/kscreen-5.24.5-r2.ebuild new file mode 100644 index 000000000000..400f3ae8d7a2 --- /dev/null +++ b/kde-plasma/kscreen/kscreen-5.24.5-r2.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="forceoptional" +KFMIN=5.90.0 +PVCUT=$(ver_cut 1-3) +QTMIN=5.15.2 +inherit ecm kde.org + +DESCRIPTION="KDE Plasma screen management" +HOMEPAGE="https://invent.kde.org/plasma/kscreen" + +LICENSE="GPL-2" # TODO: CHECK +SLOT="5" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="" + +# bug #580440, last checked 5.6.3 +RESTRICT="test" + +DEPEND=" + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtdeclarative-${QTMIN}:5[widgets] + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtsensors-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kcmutils-${KFMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/kdeclarative-${KFMIN}:5 + >=kde-frameworks/kdbusaddons-${KFMIN}:5 + >=kde-frameworks/kglobalaccel-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kiconthemes-${KFMIN}:5 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 + >=kde-frameworks/kxmlgui-${KFMIN}:5 + >=kde-frameworks/plasma-${KFMIN}:5 + >=kde-plasma/libkscreen-${PVCUT}:5 +" +RDEPEND="${DEPEND} + >=dev-qt/qtgraphicaleffects-${QTMIN}:5 + >=kde-plasma/kde-cli-tools-${PVCUT}:5 +" + +PATCHES=( + "${FILESDIR}/${P}-kcm-fix-refresh-rate-list-not-updated.patch" # KDE-bug 453392 + "${FILESDIR}/${P}-kcm-fix-choosing-refresh-rate.patch" + "${FILESDIR}/${P}-fix-connect-ext-monitors-when-a-monitor-is-rotated.patch" + "${FILESDIR}/${P}-fix-kded-xcb-resources-leak.patch" # KDE-bug 453280 +) |