public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-misc/yakuake/files/, kde-misc/yakuake/
Date: Thu, 12 Oct 2017 21:17:19 +0000 (UTC)	[thread overview]
Message-ID: <1507843000.a2cca051f8320b24468f29db9c71c27b8d79a5b9.asturm@gentoo> (raw)

commit:     a2cca051f8320b24468f29db9c71c27b8d79a5b9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 12 19:35:01 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Oct 12 21:16:40 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2cca051

kde-misc/yakuake: Fixes for Qt-5.9 and Wayland sessions

Package release cycle is slow.

Package-Manager: Portage-2.3.11, Repoman-2.3.3

 .../yakuake/files/yakuake-3.0.4-qdbus-crash.patch  |  44 ++++++++
 kde-misc/yakuake/files/yakuake-3.0.4-qicon.patch   |  32 ++++++
 .../files/yakuake-3.0.4-qt-5.9-wayland.patch       | 120 +++++++++++++++++++++
 kde-misc/yakuake/files/yakuake-3.0.4-wayland.patch |  28 +++++
 kde-misc/yakuake/yakuake-3.0.4-r1.ebuild           |  54 ++++++++++
 5 files changed, 278 insertions(+)

diff --git a/kde-misc/yakuake/files/yakuake-3.0.4-qdbus-crash.patch b/kde-misc/yakuake/files/yakuake-3.0.4-qdbus-crash.patch
new file mode 100644
index 00000000000..da3b042d701
--- /dev/null
+++ b/kde-misc/yakuake/files/yakuake-3.0.4-qdbus-crash.patch
@@ -0,0 +1,44 @@
+From 09abe657c65ba482ce9253e54467d33276f88bc9 Mon Sep 17 00:00:00 2001
+From: Vangelis Tasoulas <cyberang3l@gmail.com>
+Date: Sat, 16 Sep 2017 16:42:44 +0500
+Subject: Fixes a yakuake "index out of range" crash produced by QDBus exposed
+ function TabBar::sessionAtTab(int)
+
+Summary:
+The function `TabBar::sessionAtTab(int index)` is exposed through QDBus and if a user/script passes a negative number, yakuake crashes with `index out of range`.
+
+This patch fixes that behaviour with a sanity check. If the user passes a negative number, return -1.
+
+Test Plan:
+Run the command `qdbus org.kde.yakuake /yakuake/tabs org.kde.yakuake.sessionAtTab -1`
+Yakuake will crash.
+
+Apply the patch and re-run the above `qdbus` command. It shouldn't be crashing now.
+
+Reviewers: #kde_applications, hein, alexeymin
+
+Reviewed By: #kde_applications, hein, alexeymin
+
+Subscribers: alexeymin
+
+Differential Revision: https://phabricator.kde.org/D7812
+---
+ app/tabbar.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/app/tabbar.cpp b/app/tabbar.cpp
+index b76cdee..1bc6fdd 100644
+--- a/app/tabbar.cpp
++++ b/app/tabbar.cpp
+@@ -914,7 +914,7 @@ void TabBar::setTabTitleInteractive(int sessionId, const QString& newTitle)
+ 
+ int TabBar::sessionAtTab(int index)
+ {
+-    if (index > m_tabs.count() - 1)
++    if (index < 0 || index > m_tabs.count() - 1)
+         return -1;
+     else
+         return m_tabs.at(index);
+-- 
+cgit v0.11.2
+

diff --git a/kde-misc/yakuake/files/yakuake-3.0.4-qicon.patch b/kde-misc/yakuake/files/yakuake-3.0.4-qicon.patch
new file mode 100644
index 00000000000..608a09cf39d
--- /dev/null
+++ b/kde-misc/yakuake/files/yakuake-3.0.4-qicon.patch
@@ -0,0 +1,32 @@
+From 28138a891ff71236b3b8efcd1bc5fe7a2fe09b0d Mon Sep 17 00:00:00 2001
+From: Kai Uwe Broulik <kde@privat.broulik.de>
+Date: Wed, 2 Aug 2017 16:31:09 +0200
+Subject: [Appearance Settings] QIcon -> QIcon::fromTheme
+
+Most likely a porting error from KIcon
+
+Reviewed-By: Eike Hein
+---
+ app/config/appearancesettings.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/app/config/appearancesettings.cpp b/app/config/appearancesettings.cpp
+index c21ac33..b7d5c6f 100644
+--- a/app/config/appearancesettings.cpp
++++ b/app/config/appearancesettings.cpp
+@@ -63,9 +63,9 @@ AppearanceSettings::AppearanceSettings(QWidget* parent) : QWidget(parent)
+     connect(installButton, SIGNAL(clicked()), this, SLOT(installSkin()));
+     connect(removeButton, SIGNAL(clicked()), this, SLOT(removeSelectedSkin()));
+ 
+-    installButton->setIcon(QIcon(QStringLiteral("folder")));
+-    removeButton->setIcon(QIcon(QStringLiteral("edit-delete")));
+-    ghnsButton->setIcon(QIcon(QStringLiteral("get-hot-new-stuff")));
++    installButton->setIcon(QIcon::fromTheme(QStringLiteral("folder")));
++    removeButton->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete")));
++    ghnsButton->setIcon(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff")));
+ 
+     m_knsConfigFileName = QLatin1String("yakuake.knsrc");
+     m_knsDownloadManager = new KNSCore::DownloadManager(m_knsConfigFileName);
+-- 
+cgit v0.11.2
+

diff --git a/kde-misc/yakuake/files/yakuake-3.0.4-qt-5.9-wayland.patch b/kde-misc/yakuake/files/yakuake-3.0.4-qt-5.9-wayland.patch
new file mode 100644
index 00000000000..b24781dcc9f
--- /dev/null
+++ b/kde-misc/yakuake/files/yakuake-3.0.4-qt-5.9-wayland.patch
@@ -0,0 +1,120 @@
+From 7534df21025b10fd236dd5a8f92d0dff7889e0ef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= <mgraesslin@kde.org>
+Date: Wed, 6 Sep 2017 18:42:01 +0200
+Subject: Make Yakuake work on Wayland with Qt 5.9
+
+Summary:
+Yakuake is also affected by the common problem that the integration
+breaks once a window gets hidden, which is a very common feature of
+Yakuake.
+
+This change tracks the PlasmaShellSurface, destroys it on hide and
+recreates on show. Thus it's alwyas positioned as expected.
+
+Test Plan:
+This commit was created using a yakuake which is positioned
+correctly, although I pressed F12 a few times.
+
+Differential Revision: https://phabricator.kde.org/D7709
+---
+ app/mainwindow.cpp | 33 ++++++++++++++++++++++++++-------
+ app/mainwindow.h   |  3 +++
+ 2 files changed, 29 insertions(+), 7 deletions(-)
+
+diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
+index a7b0d89..6fa9160 100644
+--- a/app/mainwindow.cpp
++++ b/app/mainwindow.cpp
+@@ -95,6 +95,7 @@ MainWindow::MainWindow(QWidget* parent)
+     m_isWayland = QGuiApplication::platformName().startsWith(QLatin1String("wayland"));
+ #if HAVE_KWAYLAND
+     m_plasmaShell = Q_NULLPTR;
++    m_plasmaShellSurface = Q_NULLPTR;
+     initWayland();
+ #endif
+ 
+@@ -176,6 +177,21 @@ void MainWindow::initWayland()
+     registry->setup();
+     connection->roundtrip();
+ }
++
++void MainWindow::initWaylandSurface()
++{
++    if (m_plasmaShellSurface) {
++        return;
++    }
++    if (!m_plasmaShell) {
++        return;
++    }
++    if (auto surface = KWayland::Client::Surface::fromWindow(windowHandle())) {
++        m_plasmaShellSurface = m_plasmaShell->createSurface(surface, this);
++        m_plasmaShellSurface->setPosition(pos());
++    }
++}
++
+ #endif
+ 
+ bool MainWindow::queryClose()
+@@ -861,13 +877,7 @@ void MainWindow::setWindowGeometry(int newWidth, int newHeight, int newPosition)
+     setGeometry(workArea.x() + workArea.width() * newPosition * (100 - newWidth) / 10000,
+                 workArea.y(), targetWidth, maxHeight);
+ #if HAVE_KWAYLAND
+-    if (m_plasmaShell) {
+-        if (auto surface = KWayland::Client::Surface::fromWindow(windowHandle())) {
+-            if (auto plasmaSurface = m_plasmaShell->createSurface(surface, this)) {
+-                plasmaSurface->setPosition(pos());
+-            }
+-        }
+-    }
++    initWaylandSurface();
+ #endif
+ 
+     maxHeight -= m_titleBar->height();
+@@ -1303,6 +1313,10 @@ void MainWindow::sharedAfterOpenWindow()
+ 
+     applyWindowProperties();
+ 
++#if HAVE_KWAYLAND
++    initWaylandSurface();
++#endif
++
+     emit windowOpened();
+ }
+ 
+@@ -1316,6 +1330,11 @@ void MainWindow::sharedAfterHideWindow()
+ {
+     if (Settings::pollMouse()) toggleMousePoll(true);
+ 
++#if HAVE_KWAYLAND
++    delete m_plasmaShellSurface;
++    m_plasmaShellSurface = Q_NULLPTR;
++#endif
++
+     emit windowClosed();
+ }
+ 
+diff --git a/app/mainwindow.h b/app/mainwindow.h
+index 8a46c89..bb6404e 100644
+--- a/app/mainwindow.h
++++ b/app/mainwindow.h
+@@ -44,6 +44,7 @@ class KActionCollection;
+ namespace KWayland {
+     namespace Client {
+         class PlasmaShell;
++        class PlasmaShellSurface;
+     }
+ }
+ #endif
+@@ -203,7 +204,9 @@ class MainWindow : public QMainWindow
+ 
+ #if HAVE_KWAYLAND
+         void initWayland();
++        void initWaylandSurface();
+         KWayland::Client::PlasmaShell *m_plasmaShell;
++        KWayland::Client::PlasmaShellSurface *m_plasmaShellSurface;
+ #endif
+ };
+ 
+-- 
+cgit v0.11.2
+

diff --git a/kde-misc/yakuake/files/yakuake-3.0.4-wayland.patch b/kde-misc/yakuake/files/yakuake-3.0.4-wayland.patch
new file mode 100644
index 00000000000..cce53b8ac61
--- /dev/null
+++ b/kde-misc/yakuake/files/yakuake-3.0.4-wayland.patch
@@ -0,0 +1,28 @@
+From 3cdc1d0654dcd8e6eb3fc01d95fcccafe68cbb47 Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Thu, 12 Oct 2017 18:41:58 +0200
+Subject: Fix (my) yakuake on a wayland session
+
+KWindowSystem::activeWindow and winId are two entirely different things.
+
+Reviewed by Eike
+---
+ app/mainwindow.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
+index 6fa9160..028bb9c 100644
+--- a/app/mainwindow.cpp
++++ b/app/mainwindow.cpp
+@@ -1023,7 +1023,7 @@ void MainWindow::wmActiveWindowChanged()
+         return;
+     }
+ 
+-    if (!Settings::keepOpen() && isVisible() && KWindowSystem::activeWindow() != winId()) {
++    if (!Settings::keepOpen() && hasFocus()) {
+         toggleWindowState();
+     }
+ }
+-- 
+cgit v0.11.2
+

diff --git a/kde-misc/yakuake/yakuake-3.0.4-r1.ebuild b/kde-misc/yakuake/yakuake-3.0.4-r1.ebuild
new file mode 100644
index 00000000000..937b781bd66
--- /dev/null
+++ b/kde-misc/yakuake/yakuake-3.0.4-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit kde5
+
+DESCRIPTION="Quake-style terminal emulator based on konsole"
+HOMEPAGE="https://yakuake.kde.org/"
+if [[ ${KDE_BUILD_TYPE} != live ]]; then
+	SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+fi
+
+LICENSE="GPL-2 LGPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+	$(add_frameworks_dep karchive)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kcrash)
+	$(add_frameworks_dep kdbusaddons)
+	$(add_frameworks_dep kglobalaccel)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep knewstuff)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep knotifyconfig)
+	$(add_frameworks_dep kparts)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep kwayland)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kwindowsystem)
+	$(add_frameworks_dep kxmlgui)
+	$(add_kdeapps_dep konsole)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtx11extras)
+	x11-libs/libX11
+"
+RDEPEND="${DEPEND}
+	!kde-misc/yakuake:4
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-qicon.patch"
+	"${FILESDIR}/${P}-qt-5.9-wayland.patch"
+	"${FILESDIR}/${P}-qdbus-crash.patch"
+	"${FILESDIR}/${P}-wayland.patch"
+)


             reply	other threads:[~2017-10-12 21:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 21:17 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-05-09  6:32 [gentoo-commits] repo/gentoo:master commit in: kde-misc/yakuake/files/, kde-misc/yakuake/ Andreas Sturmlechner
2017-04-03 18:07 Johannes Huber
2017-01-19 23:02 Johannes Huber

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=1507843000.a2cca051f8320b24468f29db9c71c27b8d79a5b9.asturm@gentoo \
    --to=asturm@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