summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2016-10-18 21:57:11 +0200
committerJohannes Huber <johu@gentoo.org>2016-10-18 22:09:22 +0200
commit8a5934aa38e64c3560752baff5c9c7b03eff2981 (patch)
tree751c477265fbf6365b06564fc5b25aad11b2f91e /kde-apps/spectacle
parentprofiles: Update KDE PIM 16.08 mask (diff)
downloadgentoo-8a5934aa38e64c3560752baff5c9c7b03eff2981.tar.gz
gentoo-8a5934aa38e64c3560752baff5c9c7b03eff2981.tar.bz2
gentoo-8a5934aa38e64c3560752baff5c9c7b03eff2981.zip
kde-apps: Version bump KDE Applications 16.08.2
Package-Manager: portage-2.3.2
Diffstat (limited to 'kde-apps/spectacle')
-rw-r--r--kde-apps/spectacle/Manifest1
-rw-r--r--kde-apps/spectacle/files/spectacle-16.08.2-drop-kscreen.patch175
-rw-r--r--kde-apps/spectacle/spectacle-16.08.2.ebuild53
3 files changed, 229 insertions, 0 deletions
diff --git a/kde-apps/spectacle/Manifest b/kde-apps/spectacle/Manifest
index 56cb5eab2e01..e1590405d757 100644
--- a/kde-apps/spectacle/Manifest
+++ b/kde-apps/spectacle/Manifest
@@ -1,2 +1,3 @@
DIST spectacle-16.04.3.tar.xz 996884 SHA256 9c5cd301359159c46ee0ba897e1e96c797677ccf283d823a2092979b92a6aa5f SHA512 15a5f35418b87eb376ae5f45cecc0906419559b6792e9cf9ae80c212b414c2e608ba3e26045c11664de2ba9b0a96092667ef3149f5d412cf49b76cc905cc0155 WHIRLPOOL 33cb5bf06405a2c7da780f1e38ffcabe44e91fe2567d64248b6889425ffc8dbbf2c8fa1aff12de885c0c9ccd05f5634aa3ae7c1d9a042a64133b9c6cd95a136f
DIST spectacle-16.08.1.tar.xz 1000252 SHA256 08b157c8b3ea48e6c1f2d5c00c3f85e27db443920ee5d5f66e8c53da8b9a2f29 SHA512 5005a3386b828be833ce6bc8bbaf0252cc79e859e876d202a7d3d688a4815653a1c21243325af89a1eeb3e4d001523fc929192a21102f77aae685a411a7e1334 WHIRLPOOL 6b4ae35e950e00d0d9b54fbb65e6b61ad3129ecfffcfa44e984a60133bc2d6f0bee3a95e9126ae225c6e42323888e0c0e8c1d312ee2ae03f4fb0a122c00fc864
+DIST spectacle-16.08.2.tar.xz 1000396 SHA256 70805820f074b95af9a68fbb419cc6abf88a85b6f48104deab52bcaa9d7fd4ab SHA512 266d3be2f855299ec654f4d497f9037a975e6f1a684868e49e1f23c8874a0bd6fbaaec428c90b1928345ddf308279a030cfd47f861fa443b73c2a9496912d074 WHIRLPOOL 56e9d233ab23fb4ed63799fcf9782fc505e661dfcb320cfa5d95f23f30fa93c79089e70e9bab2103a16c1f3d5f7cd650883bb1573da6313400143b64a5b03178
diff --git a/kde-apps/spectacle/files/spectacle-16.08.2-drop-kscreen.patch b/kde-apps/spectacle/files/spectacle-16.08.2-drop-kscreen.patch
new file mode 100644
index 000000000000..cd2bb7c900de
--- /dev/null
+++ b/kde-apps/spectacle/files/spectacle-16.08.2-drop-kscreen.patch
@@ -0,0 +1,175 @@
+From: Peter Wu <peter@lekensteyn.nl>
+Date: Sat, 08 Oct 2016 20:16:06 +0000
+Subject: Replace KScreen by QScreen for current window grab
+X-Git-Url: http://quickgit.kde.org/?p=spectacle.git&a=commitdiff&h=e4c2e564a5b91497132d9a20d8f521af405286bd
+---
+Replace KScreen by QScreen for current window grab
+
+libkscreen is overkill for querying purposes, rely on QScreen to find
+the current screen under cursor.
+
+REVIEW: 129127
+---
+
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -75,7 +75,6 @@
+ set(XCB_COMPONENTS_ERRORS FALSE)
+ if (XCB_FOUND)
+ find_package(Qt5X11Extras ${QT_MIN_VERSION} REQUIRED)
+- find_package(KF5Screen ${PLASMA_MIN_VERSION} REQUIRED)
+ endif()
+ set(XCB_COMPONENTS_FOUND TRUE)
+ if(NOT XCB_XFIXES_FOUND)
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -83,7 +83,6 @@
+ XCB::CURSOR
+ XCB::UTIL
+ Qt5::X11Extras
+- KF5::Screen
+ )
+ endif()
+
+
+--- a/src/PlatformBackends/X11ImageGrabber.cpp
++++ b/src/PlatformBackends/X11ImageGrabber.cpp
+@@ -38,17 +38,13 @@
+
+ #include <KWindowSystem>
+ #include <KWindowInfo>
+-#include <KScreen/Config>
+-#include <KScreen/GetConfigOperation>
+-#include <KScreen/Output>
+
+ #include <xcb/xcb_cursor.h>
+ #include <xcb/xcb_util.h>
+ #include <xcb/xfixes.h>
+
+ X11ImageGrabber::X11ImageGrabber(QObject *parent) :
+- ImageGrabber(parent),
+- mScreenConfigOperation(nullptr)
++ ImageGrabber(parent)
+ {
+ mNativeEventFilter = new OnClickEventFilter(this);
+ }
+@@ -85,7 +81,6 @@
+
+ {
+ xcb_button_release_event_t *ev2 = static_cast<xcb_button_release_event_t *>(message);
+- qDebug() << ev2->detail;
+ if (ev2->detail == 1) {
+ QMetaObject::invokeMethod(mImageGrabber, "doImageGrab", Qt::QueuedConnection);
+ } else if (ev2->detail < 4) {
+@@ -349,53 +344,6 @@
+ emit pixmapChanged(mPixmap);
+ }
+
+-void X11ImageGrabber::KScreenCurrentMonitorScreenshotHelper(KScreen::ConfigOperation *op)
+-{
+- KScreen::ConfigPtr config = qobject_cast<KScreen::GetConfigOperation *>(op)->config();
+-
+- if (!config) { return grabFullScreen(); }
+- if (!config->screen()) { return grabFullScreen(); }
+-
+- // we'll store the cursor position first
+-
+- QPoint cursorPosition = QCursor::pos();
+-
+- // next, we'll get all our outputs and figure out which one has the cursor
+-
+- const KScreen::OutputList outputs = config->outputs();
+- for (auto output: outputs) {
+- if (!(output->isConnected())) { continue; }
+- if (!(output->currentMode())) { continue; }
+-
+- QPoint screenPosition = output->pos();
+- QSize screenSize = output->currentMode()->size();
+- QRect screenRect = QRect(screenPosition, screenSize);
+-
+- if (!(screenRect.contains(cursorPosition))) {
+- continue;
+- }
+-
+- // bingo, we've found an output that contains the cursor. Now
+- // to take a shot
+-
+- mPixmap = getWindowPixmap(QX11Info::appRootWindow(), mCapturePointer);
+- mPixmap = mPixmap.copy(screenPosition.x(), screenPosition.y(), screenSize.width(), screenSize.height());
+- emit pixmapChanged(mPixmap);
+-
+- mScreenConfigOperation->disconnect();
+- mScreenConfigOperation->deleteLater();
+- mScreenConfigOperation = nullptr;
+-
+- return;
+- }
+-
+- mScreenConfigOperation->disconnect();
+- mScreenConfigOperation->deleteLater();
+- mScreenConfigOperation = nullptr;
+-
+- return grabFullScreen();
+-}
+-
+ void X11ImageGrabber::rectangleSelectionCancelled()
+ {
+ QObject *sender = QObject::sender();
+@@ -621,9 +569,20 @@
+
+ void X11ImageGrabber::grabCurrentScreen()
+ {
+- mScreenConfigOperation = new KScreen::GetConfigOperation;
+- connect(mScreenConfigOperation, &KScreen::GetConfigOperation::finished,
+- this, &X11ImageGrabber::KScreenCurrentMonitorScreenshotHelper);
++ QPoint cursorPosition = QCursor::pos();
++ for (auto screen : QGuiApplication::screens()) {
++ const QRect screenRect = screen->geometry();
++ if (!screenRect.contains(cursorPosition)) {
++ continue;
++ }
++
++ mPixmap = getWindowPixmap(QX11Info::appRootWindow(), mCapturePointer).copy(screenRect);
++ emit pixmapChanged(mPixmap);
++ return;
++ }
++
++ // No screen found with our cursor, fallback to capturing full screen
++ grabFullScreen();
+ }
+
+ void X11ImageGrabber::grabRectangularRegion()
+
+--- a/src/PlatformBackends/X11ImageGrabber.h
++++ b/src/PlatformBackends/X11ImageGrabber.h
+@@ -28,11 +28,6 @@
+ #include "ImageGrabber.h"
+
+ class X11ImageGrabber;
+-namespace KScreen
+-{
+- class GetConfigOperation;
+- class ConfigOperation;
+-}
+
+ class OnClickEventFilter : public QAbstractNativeEventFilter
+ {
+@@ -70,7 +65,6 @@
+ private slots:
+
+ void KWinDBusScreenshotHelper(quint64 window);
+- void KScreenCurrentMonitorScreenshotHelper(KScreen::ConfigOperation *op);
+ void rectangleSelectionConfirmed(const QPixmap &pixmap, const QRect &region);
+ void rectangleSelectionCancelled();
+
+@@ -90,7 +84,6 @@
+ QPixmap convertFromNative(xcb_image_t *xcbImage);
+
+ OnClickEventFilter *mNativeEventFilter;
+- KScreen::GetConfigOperation *mScreenConfigOperation;
+ };
+
+ template <typename T> using CScopedPointer = QScopedPointer<T, QScopedPointerPodDeleter>;
+
diff --git a/kde-apps/spectacle/spectacle-16.08.2.ebuild b/kde-apps/spectacle/spectacle-16.08.2.ebuild
new file mode 100644
index 000000000000..1565bb0146df
--- /dev/null
+++ b/kde-apps/spectacle/spectacle-16.08.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+KDE_HANDBOOK="forceoptional"
+inherit kde5
+
+DESCRIPTION="Screenshot capture utility"
+LICENSE="LGPL-2+ handbook? ( FDL-1.3 ) kipi? ( GPL-2+ )"
+KEYWORDS="~amd64 ~x86"
+IUSE="kipi share"
+
+DEPEND="
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kdbusaddons)
+ $(add_frameworks_dep kdeclarative)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep knotifications)
+ $(add_frameworks_dep kservice)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kwindowsystem)
+ $(add_frameworks_dep kxmlgui)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtdeclarative)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtprintsupport)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtx11extras)
+ x11-libs/libxcb
+ x11-libs/xcb-util
+ x11-libs/xcb-util-cursor
+ x11-libs/xcb-util-image
+ kipi? ( $(add_kdeapps_dep libkipi '' '' '5=') )
+ share? ( dev-libs/purpose:5 )
+"
+RDEPEND="${DEPEND}
+ !kde-apps/ksnapshot
+"
+
+PATCHES=( "${FILESDIR}/${PN}-16.08.2-drop-kscreen.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package kipi KF5Kipi)
+ $(cmake-utils_use_find_package share KDEExperimentalPurpose)
+ )
+ kde5_src_configure
+}