public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Maciej Mrozowski" <reavertm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/dolphin/files/, kde-apps/dolphin/
Date: Sat, 13 May 2023 21:30:35 +0000 (UTC)	[thread overview]
Message-ID: <1684013396.0f40b12d3f5d6182cf7b74cebdfaacb0051d11e8.reavertm@gentoo> (raw)

commit:     0f40b12d3f5d6182cf7b74cebdfaacb0051d11e8
Author:     Maciej Mrozowski <reavertm <AT> gentoo <DOT> org>
AuthorDate: Sat May 13 21:27:48 2023 +0000
Commit:     Maciej Mrozowski <reavertm <AT> gentoo <DOT> org>
CommitDate: Sat May 13 21:29:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f40b12d

kde-apps/dolphin: revert upstream commit in 23.04.1 that introduces startup delay with USE=-activities

Signed-off-by: Maciej Mrozowski <reavertm <AT> gentoo.org>
Bug: https://bugs.gentoo.org/906170

 kde-apps/dolphin/dolphin-23.04.1.ebuild            |   4 +
 .../files/dolphin-23.04.1-fix-startup-delay.patch  | 121 +++++++++++++++++++++
 2 files changed, 125 insertions(+)

diff --git a/kde-apps/dolphin/dolphin-23.04.1.ebuild b/kde-apps/dolphin/dolphin-23.04.1.ebuild
index 6972df06322e..c323a3f3ea19 100644
--- a/kde-apps/dolphin/dolphin-23.04.1.ebuild
+++ b/kde-apps/dolphin/dolphin-23.04.1.ebuild
@@ -62,6 +62,10 @@ RDEPEND="${DEPEND}
 	>=kde-apps/kio-extras-${PVCUT}:5
 "
 
+PATCHES=(
+	"${FILESDIR}/dolphin-23.04.1-fix-startup-delay.patch"
+)
+
 src_configure() {
 	local mycmakeargs=(
 		-DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON

diff --git a/kde-apps/dolphin/files/dolphin-23.04.1-fix-startup-delay.patch b/kde-apps/dolphin/files/dolphin-23.04.1-fix-startup-delay.patch
new file mode 100644
index 000000000000..6a34ff66efb3
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-23.04.1-fix-startup-delay.patch
@@ -0,0 +1,121 @@
+Revert patch https://invent.kde.org/system/dolphin/-/commit/d19800c69198b904ae47cb1e53dfe28f74618eb2
+See https://bugs.gentoo.org/906170
+---
+diff -ruN dolphin-23.04.1/src/dolphinmainwindow.cpp new/src/dolphinmainwindow.cpp
+--- dolphin-23.04.1/src/dolphinmainwindow.cpp	2023-05-09 10:52:07.000000000 +0200
++++ new/src/dolphinmainwindow.cpp	2023-05-13 22:37:50.984895964 +0200
+@@ -270,31 +270,6 @@
+     openFiles(QUrl::fromStringList(files), splitView);
+ }
+ 
+-bool DolphinMainWindow::isOnCurrentDesktop() const
+-{
+-#if HAVE_X11
+-    if (KWindowSystem::isPlatformX11()) {
+-        const NET::Properties properties = NET::WMDesktop;
+-        KWindowInfo info(this->winId(), properties);
+-        return info.isOnCurrentDesktop();
+-    }
+-#endif
+-    return true;
+-}
+-
+-bool DolphinMainWindow::isOnActivity(const QString &activityId) const
+-{
+-#if HAVE_X11 && HAVE_KACTIVITIES
+-    if (KWindowSystem::isPlatformX11()) {
+-        const NET::Properties properties = NET::Supported;
+-        const NET::Properties2 properties2 = NET::WM2Activities;
+-        KWindowInfo info(this->winId(), properties, properties2);
+-        return info.activities().contains(activityId);
+-    }
+-#endif
+-    return true;
+-}
+-
+ void DolphinMainWindow::activateWindow(const QString &activationToken)
+ {
+     window()->setAttribute(Qt::WA_NativeWindow, true);
+diff -ruN dolphin-23.04.1/src/dolphinmainwindow.h new/src/dolphinmainwindow.h
+--- dolphin-23.04.1/src/dolphinmainwindow.h	2023-05-09 10:52:07.000000000 +0200
++++ new/src/dolphinmainwindow.h	2023-05-13 22:37:50.984895964 +0200
+@@ -203,9 +203,6 @@
+     /** @see GeneralSettings::splitViewChanged() */
+     void slotSplitViewChanged();
+ 
+-    bool isOnActivity(const QString &activityId) const;
+-    bool isOnCurrentDesktop() const;
+-
+ Q_SIGNALS:
+     /**
+      * Is sent if the selection of the currently active view has
+diff -ruN dolphin-23.04.1/src/global.cpp new/src/global.cpp
+--- dolphin-23.04.1/src/global.cpp	2023-05-09 10:52:07.000000000 +0200
++++ new/src/global.cpp	2023-05-13 22:50:40.449973915 +0200
+@@ -16,9 +16,6 @@
+ #include <KIO/ApplicationLauncherJob>
+ #include <KService>
+ #include <KWindowSystem>
+-#if HAVE_KACTIVITIES
+-#include <KActivities/Consumer>
+-#endif
+ 
+ #include <QApplication>
+ 
+@@ -143,37 +140,13 @@
+ 
+ QVector<QPair<QSharedPointer<OrgKdeDolphinMainWindowInterface>, QStringList>> Dolphin::dolphinGuiInstances(const QString &preferredService)
+ {
+-#if HAVE_KACTIVITIES
+-    static std::once_flag one_consumer;
+-    static KActivities::Consumer *consumer;
+-    std::call_once(one_consumer, []() {
+-        consumer = new KActivities::Consumer();
+-        // ensures the consumer is ready for query
+-        QEventLoop loop;
+-        QObject::connect(consumer, &KActivities::Consumer::serviceStatusChanged, &loop, &QEventLoop::quit);
+-        loop.exec();
+-    });
+-#endif
+-
+     QVector<QPair<QSharedPointer<OrgKdeDolphinMainWindowInterface>, QStringList>> dolphinInterfaces;
+-    const auto tryAppendInterface = [&dolphinInterfaces](const QString &service) {
+-        // Check if instance can handle our URLs
+-        QSharedPointer<OrgKdeDolphinMainWindowInterface> interface(
+-            new OrgKdeDolphinMainWindowInterface(service, QStringLiteral("/dolphin/Dolphin_1"), QDBusConnection::sessionBus()));
+-        if (interface->isValid() && !interface->lastError().isValid()) {
+-#if HAVE_KACTIVITIES
+-            const auto currentActivity = consumer->currentActivity();
+-            if (currentActivity.isEmpty() || currentActivity == QStringLiteral("00000000-0000-0000-0000-000000000000")
+-                || interface->isOnActivity(consumer->currentActivity()))
+-#endif
+-                if (interface->isOnCurrentDesktop()) {
+-                    dolphinInterfaces.append(qMakePair(interface, QStringList()));
+-                }
+-        }
+-    };
+-
+     if (!preferredService.isEmpty()) {
+-        tryAppendInterface(preferredService);
++        QSharedPointer<OrgKdeDolphinMainWindowInterface> preferredInterface(
++            new OrgKdeDolphinMainWindowInterface(preferredService, QStringLiteral("/dolphin/Dolphin_1"), QDBusConnection::sessionBus()));
++        if (preferredInterface->isValid() && !preferredInterface->lastError().isValid()) {
++            dolphinInterfaces.append(qMakePair(preferredInterface, QStringList()));
++        }
+     }
+ 
+     // Look for dolphin instances among all available dbus services.
+@@ -185,7 +158,12 @@
+     const QString myPid = QLatin1Char('-') + QString::number(QCoreApplication::applicationPid());
+     for (const QString &service : dbusServices) {
+         if (service.startsWith(pattern) && !service.endsWith(myPid)) {
+-            tryAppendInterface(service);
++            // Check if instance can handle our URLs
++            QSharedPointer<OrgKdeDolphinMainWindowInterface> interface(
++                new OrgKdeDolphinMainWindowInterface(service, QStringLiteral("/dolphin/Dolphin_1"), QDBusConnection::sessionBus()));
++            if (interface->isValid() && !interface->lastError().isValid()) {
++                dolphinInterfaces.append(qMakePair(interface, QStringList()));
++            }
+         }
+     }
+ 


             reply	other threads:[~2023-05-13 21:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-13 21:30 Maciej Mrozowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-23 21:32 [gentoo-commits] repo/gentoo:master commit in: kde-apps/dolphin/files/, kde-apps/dolphin/ Andreas Sturmlechner
2018-07-21 16:51 Andreas Sturmlechner
2018-05-24 15:31 Andreas Sturmlechner
2015-08-27 11:09 Michael Palimaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1684013396.0f40b12d3f5d6182cf7b74cebdfaacb0051d11e8.reavertm@gentoo \
    --to=reavertm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox