diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-01-07 12:48:07 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-01-24 20:42:48 +0100 |
commit | d7b37c66c43ee06f73bda0f355c1c631148de9f6 (patch) | |
tree | e8ee7156eb3e52115de2471b45761b2943c9b77a /kde-plasma | |
parent | kde-plasma/kwayland-server: drop 5.19.5* (diff) | |
download | gentoo-d7b37c66c43ee06f73bda0f355c1c631148de9f6.tar.gz gentoo-d7b37c66c43ee06f73bda0f355c1c631148de9f6.tar.bz2 gentoo-d7b37c66c43ee06f73bda0f355c1c631148de9f6.zip |
kde-plasma/kwin: drop 5.19.5*
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma')
-rw-r--r-- | kde-plasma/kwin/Manifest | 1 | ||||
-rw-r--r-- | kde-plasma/kwin/files/kwin-5.19.5-safe-removal-of-X11-event-filters.patch | 162 | ||||
-rw-r--r-- | kde-plasma/kwin/kwin-5.19.5-r1.ebuild | 113 |
3 files changed, 0 insertions, 276 deletions
diff --git a/kde-plasma/kwin/Manifest b/kde-plasma/kwin/Manifest index dfb8a77cebcf..96bce4ecebf4 100644 --- a/kde-plasma/kwin/Manifest +++ b/kde-plasma/kwin/Manifest @@ -1,2 +1 @@ -DIST kwin-5.19.5.tar.xz 6260188 BLAKE2B bcf3c8afc00af0df8cddeb49396bd23df6178e379ac4c3ba3c547a2c602d309202a72136b69b83f729434fc5691ba24699cf3f44d47b2c033623bca5d551bdb1 SHA512 97ad0096066d99b4bba3089416a6d3744b6f83d82a004caa8762b420cad34cac4221b3535678d4c6f1bcb43c4d97db56be5ac68c4ac501dc168f4472a6c0dad5 DIST kwin-5.20.5.tar.xz 6329444 BLAKE2B e80890c1a353b3b8a15659ea3f88e08b84f29ee863aa41ed99758e93008def940450abc2ad66bc2f5d4c9cd391a3d6ddb21eb2ab79d3696b7373f8ae0fdb6d89 SHA512 e9186dc71e3e9b913314a83fe9413b956d61d633f0e8418fd47d82178c6f50eb75b03299c00495af351b0951df23057500ef28123123583c291a0c29ea3414f1 diff --git a/kde-plasma/kwin/files/kwin-5.19.5-safe-removal-of-X11-event-filters.patch b/kde-plasma/kwin/files/kwin-5.19.5-safe-removal-of-X11-event-filters.patch deleted file mode 100644 index 7eeccf6e8c5f..000000000000 --- a/kde-plasma/kwin/files/kwin-5.19.5-safe-removal-of-X11-event-filters.patch +++ /dev/null @@ -1,162 +0,0 @@ -From c5880833d94330d022c4b6fc84c175aadeaf9632 Mon Sep 17 00:00:00 2001 -From: Vlad Zahorodnii <vlad.zahorodnii@kde.org> -Date: Tue, 22 Sep 2020 08:53:17 +0000 -Subject: [PATCH] x11: Make removal of X11 event filters safe - -If an X11 event filter has been activated and it unregisters another X11 -event filter, then the window manager may crash because the foreach macro -in Workspace::workspaceEvent() makes a copy of m_genericEventFilters or -m_eventFilters and we can call the event() method for an already defunct -filter. - -With this change, X11 event filters can be safely removed and installed -at any particular moment. - -BUG: 423319 - - -(cherry picked from commit a433fb08a3a9255802405a17dd4c8270c68fcb25) ---- - events.cpp | 52 +++++++++++++++++++++++++++++++++++++++++---------- - workspace.cpp | 10 ++++++++++ - workspace.h | 17 +++++++++++++++-- - 3 files changed, 67 insertions(+), 12 deletions(-) - -diff --git a/events.cpp b/events.cpp -index eb3572d13..2e8885d76 100644 ---- a/events.cpp -+++ b/events.cpp -@@ -165,18 +165,34 @@ QVector<QByteArray> s_xcbEerrors({ - - void Workspace::registerEventFilter(X11EventFilter *filter) - { -- if (filter->isGenericEvent()) -- m_genericEventFilters.append(filter); -- else -- m_eventFilters.append(filter); -+ if (filter->isGenericEvent()) { -+ m_genericEventFilters.append(new X11EventFilterContainer(filter)); -+ } else { -+ m_eventFilters.append(new X11EventFilterContainer(filter)); -+ } -+} -+ -+static X11EventFilterContainer *takeEventFilter(X11EventFilter *eventFilter, -+ QList<QPointer<X11EventFilterContainer>> &list) -+{ -+ for (int i = 0; i < list.count(); ++i) { -+ X11EventFilterContainer *container = list.at(i); -+ if (container->filter() == eventFilter) { -+ return list.takeAt(i); -+ } -+ } -+ return nullptr; - } - - void Workspace::unregisterEventFilter(X11EventFilter *filter) - { -- if (filter->isGenericEvent()) -- m_genericEventFilters.removeOne(filter); -- else -- m_eventFilters.removeOne(filter); -+ X11EventFilterContainer *container = nullptr; -+ if (filter->isGenericEvent()) { -+ container = takeEventFilter(filter, m_genericEventFilters); -+ } else { -+ container = takeEventFilter(filter, m_eventFilters); -+ } -+ delete container; - } - - -@@ -219,13 +235,29 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e) - if (eventType == XCB_GE_GENERIC) { - xcb_ge_generic_event_t *ge = reinterpret_cast<xcb_ge_generic_event_t *>(e); - -- foreach (X11EventFilter *filter, m_genericEventFilters) { -+ // We need to make a shadow copy of the event filter list because an activated event -+ // filter may mutate it by removing or installing another event filter. -+ const auto eventFilters = m_genericEventFilters; -+ -+ for (X11EventFilterContainer *container : eventFilters) { -+ if (!container) { -+ continue; -+ } -+ X11EventFilter *filter = container->filter(); - if (filter->extension() == ge->extension && filter->genericEventTypes().contains(ge->event_type) && filter->event(e)) { - return true; - } - } - } else { -- foreach (X11EventFilter *filter, m_eventFilters) { -+ // We need to make a shadow copy of the event filter list because an activated event -+ // filter may mutate it by removing or installing another event filter. -+ const auto eventFilters = m_eventFilters; -+ -+ for (X11EventFilterContainer *container : eventFilters) { -+ if (!container) { -+ continue; -+ } -+ X11EventFilter *filter = container->filter(); - if (filter->eventTypes().contains(eventType) && filter->event(e)) { - return true; - } -diff --git a/workspace.cpp b/workspace.cpp -index a87a622e9..fd3634b16 100644 ---- a/workspace.cpp -+++ b/workspace.cpp -@@ -66,6 +66,16 @@ namespace KWin - extern int screen_number; - extern bool is_multihead; - -+X11EventFilterContainer::X11EventFilterContainer(X11EventFilter *filter) -+ : m_filter(filter) -+{ -+} -+ -+X11EventFilter *X11EventFilterContainer::filter() const -+{ -+ return m_filter; -+} -+ - ColorMapper::ColorMapper(QObject *parent) - : QObject(parent) - , m_default(kwinApp()->x11DefaultScreen()->default_colormap) -diff --git a/workspace.h b/workspace.h -index 489d7bae4..61fb215a8 100644 ---- a/workspace.h -+++ b/workspace.h -@@ -55,6 +55,19 @@ class X11Client; - class X11EventFilter; - enum class Predicate; - -+class X11EventFilterContainer : public QObject -+{ -+ Q_OBJECT -+ -+public: -+ explicit X11EventFilterContainer(X11EventFilter *filter); -+ -+ X11EventFilter *filter() const; -+ -+private: -+ X11EventFilter *m_filter; -+}; -+ - class KWIN_EXPORT Workspace : public QObject - { - Q_OBJECT -@@ -654,8 +667,8 @@ private: - - QScopedPointer<KillWindow> m_windowKiller; - -- QList<X11EventFilter *> m_eventFilters; -- QList<X11EventFilter *> m_genericEventFilters; -+ QList<QPointer<X11EventFilterContainer>> m_eventFilters; -+ QList<QPointer<X11EventFilterContainer>> m_genericEventFilters; - QScopedPointer<X11EventFilter> m_movingClientFilter; - QScopedPointer<X11EventFilter> m_syncAlarmFilter; - --- -GitLab - diff --git a/kde-plasma/kwin/kwin-5.19.5-r1.ebuild b/kde-plasma/kwin/kwin-5.19.5-r1.ebuild deleted file mode 100644 index fc1182510000..000000000000 --- a/kde-plasma/kwin/kwin-5.19.5-r1.ebuild +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -ECM_HANDBOOK="optional" -ECM_TEST="optional" -KFMIN=5.71.0 -PVCUT=$(ver_cut 1-3) -QTMIN=5.14.2 -VIRTUALX_REQUIRED="test" -inherit ecm kde.org - -DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux" - -LICENSE="GPL-2+" -SLOT="5" -KEYWORDS="amd64 ~arm arm64 ~ppc64 x86" -IUSE="caps gles2-only multimedia" - -COMMON_DEPEND=" - >=dev-libs/libinput-1.14 - >=dev-libs/wayland-1.2 - >=dev-qt/qtdbus-${QTMIN}:5 - >=dev-qt/qtdeclarative-${QTMIN}:5 - >=dev-qt/qtgui-${QTMIN}:5=[gles2-only=] - >=dev-qt/qtscript-${QTMIN}:5 - >=dev-qt/qtsensors-${QTMIN}:5 - >=dev-qt/qtwidgets-${QTMIN}:5 - >=dev-qt/qtx11extras-${QTMIN}:5 - >=kde-frameworks/kactivities-${KFMIN}:5 - >=kde-frameworks/kauth-${KFMIN}:5 - >=kde-frameworks/kcmutils-${KFMIN}:5 - >=kde-frameworks/kcompletion-${KFMIN}:5 - >=kde-frameworks/kconfig-${KFMIN}:5 - >=kde-frameworks/kconfigwidgets-${KFMIN}:5 - >=kde-frameworks/kcoreaddons-${KFMIN}:5 - >=kde-frameworks/kcrash-${KFMIN}:5 - >=kde-frameworks/kdeclarative-${KFMIN}:5 - >=kde-frameworks/kglobalaccel-${KFMIN}:5= - >=kde-frameworks/ki18n-${KFMIN}:5 - >=kde-frameworks/kiconthemes-${KFMIN}:5 - >=kde-frameworks/kidletime-${KFMIN}:5= - >=kde-frameworks/kio-${KFMIN}:5 - >=kde-frameworks/knewstuff-${KFMIN}:5 - >=kde-frameworks/knotifications-${KFMIN}:5 - >=kde-frameworks/kpackage-${KFMIN}:5 - >=kde-frameworks/kservice-${KFMIN}:5 - >=kde-frameworks/ktextwidgets-${KFMIN}:5 - >=kde-frameworks/kwayland-${KFMIN}:5 - >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 - >=kde-frameworks/kwindowsystem-${KFMIN}:5[X] - >=kde-frameworks/kxmlgui-${KFMIN}:5 - >=kde-frameworks/plasma-${KFMIN}:5 - >=kde-plasma/breeze-${PVCUT}:5 - >=kde-plasma/kdecoration-${PVCUT}:5 - >=kde-plasma/kscreenlocker-${PVCUT}:5 - >=kde-plasma/kwayland-server-${PVCUT}:5 - media-libs/fontconfig - media-libs/freetype - media-libs/libepoxy - media-libs/mesa[egl,gbm,wayland,X(+)] - virtual/libudev:= - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXi - x11-libs/libdrm - >=x11-libs/libxcb-1.10 - >=x11-libs/libxkbcommon-0.7.0 - x11-libs/xcb-util-cursor - x11-libs/xcb-util-image - x11-libs/xcb-util-keysyms - x11-libs/xcb-util-wm - caps? ( sys-libs/libcap ) - gles2-only? ( media-libs/mesa[gles2] ) -" -# TODO: sys-apps/hwdata? not packaged yet; commit 33a1777a, Gentoo-bug 717216 -RDEPEND="${COMMON_DEPEND} - >=dev-qt/qtquickcontrols-${QTMIN}:5 - >=dev-qt/qtquickcontrols2-${QTMIN}:5 - >=dev-qt/qtvirtualkeyboard-${QTMIN}:5 - >=kde-frameworks/kirigami-${KFMIN}:5 - >=kde-frameworks/kitemmodels-${KFMIN}:5[qml] - multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] ) -" -DEPEND="${COMMON_DEPEND} - >=dev-qt/designer-${QTMIN}:5 - >=dev-qt/qtconcurrent-${QTMIN}:5 - x11-base/xorg-proto -" -PDEPEND=" - >=kde-plasma/kde-cli-tools-${PVCUT}:5 -" - -RESTRICT+=" test" - -PATCHES=( - "${FILESDIR}"/${P}-safe-removal-of-X11-event-filters.patch # KDE-Bug 423319 -) - -src_prepare() { - ecm_src_prepare - use multimedia || eapply "${FILESDIR}/${PN}-5.16.80-gstreamer-optional.patch" -} - -src_configure() { - local mycmakeargs=( - $(cmake_use_find_package caps Libcap) - ) - - ecm_src_configure -} |