summaryrefslogtreecommitdiff
path: root/user/spectacle
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-21 03:58:30 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-21 03:58:30 +0000
commit567b9f31377911c4fc358e9c32ea960536ecad2a (patch)
tree14a84793a40e16bb4bf0fd75080722e5b98f021d /user/spectacle
parent4546d75f362e4fd156697d1c0912caa37f4e9174 (diff)
downloadpackages-567b9f31377911c4fc358e9c32ea960536ecad2a.tar.gz
packages-567b9f31377911c4fc358e9c32ea960536ecad2a.tar.bz2
packages-567b9f31377911c4fc358e9c32ea960536ecad2a.tar.xz
packages-567b9f31377911c4fc358e9c32ea960536ecad2a.zip
user/[KDE Applications]: bump to 19.08.2 (except kdenlive)
Diffstat (limited to 'user/spectacle')
-rw-r--r--user/spectacle/APKBUILD6
-rw-r--r--user/spectacle/no-wayland.patch192
2 files changed, 196 insertions, 2 deletions
diff --git a/user/spectacle/APKBUILD b/user/spectacle/APKBUILD
index 9592e765f..0eab09c31 100644
--- a/user/spectacle/APKBUILD
+++ b/user/spectacle/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=spectacle
-pkgver=19.08.1
+pkgver=19.08.2
pkgrel=0
pkgdesc="Application for capturing desktop screenshots"
url="https://www.kde.org/applications/graphics/spectacle/"
@@ -15,6 +15,7 @@ makedepends="cmake extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev
libxcb-dev xcb-util-renderutil-dev knewstuff-dev libkipi-dev"
subpackages="$pkgname-doc $pkgname-lang"
source="https://download.kde.org/stable/applications/$pkgver/src/spectacle-$pkgver.tar.xz
+ no-wayland.patch
qt5.9.patch
"
@@ -42,5 +43,6 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="0ebaff47cbb3406747a49d7f814f154b4e139a7f4461da389fcf65b347f9272e2c85a772886fb0819cfc539d1d878e5acda622331cf5220ef263412663f24fa6 spectacle-19.08.1.tar.xz
+sha512sums="a03dbe13aa0e0cea07b6505ead130946233574863fc5994d42a971d8a9ae0a24be5e4dfab38640857d5bb89f33dc3736bad7e87a3a76aa83b450156e8db96723 spectacle-19.08.2.tar.xz
+36665d1b7d8b7c8004e457179f03fff1eed3865ee3e558f44f19022b80e39bbb2659de3e7b9affe654d5dbc5077890b38b6b4351f3a43324733749fbd36880ac no-wayland.patch
781e1611026a45232fa117b90a1520bed380e512ae2e0690785a960f897342284ce0c553d8fb22caf10fd34c3823ee7dacb770815c871808345c1bb05126b74f qt5.9.patch"
diff --git a/user/spectacle/no-wayland.patch b/user/spectacle/no-wayland.patch
new file mode 100644
index 000000000..554e64d34
--- /dev/null
+++ b/user/spectacle/no-wayland.patch
@@ -0,0 +1,192 @@
+From bd10239697d436caaa8aac3f4eca8aa2a5c14cac Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Fri, 18 Oct 2019 19:48:50 -0500
+Subject: [PATCH] Revert "Make QuickEditor fullscreen on Wayland"
+
+Allow building without Wayland libraries.
+
+This reverts commit 5679f7f5c9bc56e59744e9e4045dd01d7142fbfb.
+---
+ CMakeLists.txt | 1 -
+ src/CMakeLists.txt | 1 -
+ src/QuickEditor/QuickEditor.cpp | 18 ++----------------
+ src/QuickEditor/QuickEditor.h | 8 +-------
+ src/SpectacleCore.cpp | 26 ++------------------------
+ src/SpectacleCore.h | 7 -------
+ 6 files changed, 5 insertions(+), 56 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3395c1b..06009f1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -68,7 +68,6 @@ find_package(
+ NewStuff
+ GlobalAccel
+ XmlGui
+- Wayland
+ )
+
+ # optional components
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 6ff1b30..80e50dd 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -84,7 +84,6 @@ target_link_libraries(
+ KF5::NewStuff
+ KF5::GlobalAccel
+ KF5::XmlGui
+- KF5::WaylandClient
+ )
+
+ if(XCB_FOUND)
+diff --git a/src/QuickEditor/QuickEditor.cpp b/src/QuickEditor/QuickEditor.cpp
+index 41e5858..92ced06 100644
+--- a/src/QuickEditor/QuickEditor.cpp
++++ b/src/QuickEditor/QuickEditor.cpp
+@@ -18,8 +18,6 @@
+ */
+
+ #include <KLocalizedString>
+-#include <KWayland/Client/plasmashell.h>
+-#include <KWayland/Client/surface.h>
+ #include <QGuiApplication>
+ #include <QScreen>
+ #include <QtCore/qmath.h>
+@@ -52,7 +50,7 @@ const int QuickEditor::magZoom = 5;
+ const int QuickEditor::magPixels = 16;
+ const int QuickEditor::magOffset = 32;
+
+-QuickEditor::QuickEditor(const QPixmap &thePixmap, KWayland::Client::PlasmaShell *plasmashell, QWidget *parent) :
++QuickEditor::QuickEditor(const QPixmap& thePixmap, QWidget *parent) :
+ QWidget(parent),
+ mMaskColor(QColor::fromRgbF(0, 0, 0, 0.15)),
+ mStrokeColor(palette().highlight().color()),
+@@ -91,19 +89,7 @@ QuickEditor::QuickEditor(const QPixmap &thePixmap, KWayland::Client::PlasmaShell
+
+ dprI = 1.0 / devicePixelRatioF();
+ setGeometry(0, 0, static_cast<int>(mPixmap.width() * dprI), static_cast<int>(mPixmap.height() * dprI));
+- // TODO This is a hack until a better interface is available
+- if (plasmashell) {
+- using namespace KWayland::Client;
+- winId();
+- auto surface = Surface::fromWindow(windowHandle());
+- if (!surface) {
+- return;
+- }
+- PlasmaShellSurface *plasmashellSurface = plasmashell->createSurface(surface, this);
+- plasmashellSurface->setRole(PlasmaShellSurface::Role::Panel);
+- plasmashellSurface->setPanelTakesFocus(true);
+- plasmashellSurface->setPosition(geometry().topLeft());
+- }
++
+ if (config->rememberLastRectangularRegion()) {
+ QRect cropRegion = config->cropRegion();
+ if (!cropRegion.isEmpty()) {
+diff --git a/src/QuickEditor/QuickEditor.h b/src/QuickEditor/QuickEditor.h
+index 8dd6586..8187995 100644
+--- a/src/QuickEditor/QuickEditor.h
++++ b/src/QuickEditor/QuickEditor.h
+@@ -29,19 +29,13 @@
+
+ class QMouseEvent;
+
+-namespace KWayland {
+-namespace Client {
+-class PlasmaShell;
+-}
+-}
+-
+ class QuickEditor: public QWidget
+ {
+ Q_OBJECT
+
+ public:
+
+- explicit QuickEditor(const QPixmap &thePixmap, KWayland::Client::PlasmaShell *plasmashell, QWidget *parent = nullptr);
++ explicit QuickEditor(const QPixmap &thePixmap, QWidget *parent = nullptr);
+ virtual ~QuickEditor() = default;
+
+ private:
+diff --git a/src/SpectacleCore.cpp b/src/SpectacleCore.cpp
+index 7024750..40417bb 100644
+--- a/src/SpectacleCore.cpp
++++ b/src/SpectacleCore.cpp
+@@ -27,9 +27,6 @@
+ #include <KMessageBox>
+ #include <KNotification>
+ #include <KRun>
+-#include <KWayland/Client/connection_thread.h>
+-#include <KWayland/Client/plasmashell.h>
+-#include <KWayland/Client/registry.h>
+ #include <KWindowSystem>
+
+ #include <QApplication>
+@@ -54,8 +51,7 @@ SpectacleCore::SpectacleCore(StartMode theStartMode,
+ mPlatform(loadPlatform()),
+ mMainWindow(nullptr),
+ mIsGuiInited(false),
+- mCopyToClipboard(theCopyToClipboard),
+- mWaylandPlasmashell(nullptr)
++ mCopyToClipboard(theCopyToClipboard)
+ {
+ auto lConfig = KSharedConfig::openConfig(QStringLiteral("spectaclerc"));
+ KConfigGroup lGuiConfig(lConfig, "GuiConfig");
+@@ -92,24 +88,6 @@ SpectacleCore::SpectacleCore(StartMode theStartMode,
+ connect(lExportManager, &ExportManager::forceNotify, this, &SpectacleCore::doNotify);
+ connect(mPlatform.get(), &Platform::windowTitleChanged, lExportManager, &ExportManager::setWindowTitle);
+
+- // Needed so the QuickEditor can go fullscreen on wayland
+- if (KWindowSystem::isPlatformWayland()) {
+- using namespace KWayland::Client;
+- ConnectionThread *connection = ConnectionThread::fromApplication(this);
+- if (!connection) {
+- return;
+- }
+- Registry *registry = new Registry(this);
+- registry->create(connection);
+- connect(registry, &Registry::plasmaShellAnnounced, this,
+- [this, registry] (quint32 name, quint32 version) {
+- mWaylandPlasmashell = registry->createPlasmaShell(name, version, this);
+- }
+- );
+- registry->setup();
+- connection->roundtrip();
+- }
+-
+ switch (theStartMode) {
+ case StartMode::DBus:
+ break;
+@@ -245,7 +223,7 @@ void SpectacleCore::screenshotUpdated(const QPixmap &thePixmap)
+
+ if (lExportManager->captureMode() == Spectacle::CaptureMode::RectangularRegion) {
+ if(!mQuickEditor) {
+- mQuickEditor = std::make_unique<QuickEditor>(thePixmap, mWaylandPlasmashell);
++ mQuickEditor = std::make_unique<QuickEditor>(thePixmap);
+ connect(mQuickEditor.get(), &QuickEditor::grabDone, this, &SpectacleCore::screenshotUpdated);
+ connect(mQuickEditor.get(), &QuickEditor::grabCancelled, this, &SpectacleCore::screenshotFailed);
+ mQuickEditor->show();
+diff --git a/src/SpectacleCore.h b/src/SpectacleCore.h
+index 3e90a99..8994995 100644
+--- a/src/SpectacleCore.h
++++ b/src/SpectacleCore.h
+@@ -30,12 +30,6 @@
+
+ #include <memory>
+
+-namespace KWayland {
+-namespace Client {
+-class PlasmaShell;
+-}
+-}
+-
+ using MainWindowPtr = std::unique_ptr<KSMainWindow>;
+ using EditorPtr = std::unique_ptr<QuickEditor>;
+
+@@ -98,4 +92,3 @@ class SpectacleCore: public QObject
+ bool mIsGuiInited;
+ bool mCopyToClipboard;
+- KWayland::Client::PlasmaShell *mWaylandPlasmashell;
+ };
+--
+2.22.1
+