summaryrefslogtreecommitdiff
path: root/user/spectacle/no-wayland.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/spectacle/no-wayland.patch')
-rw-r--r--user/spectacle/no-wayland.patch29
1 files changed, 13 insertions, 16 deletions
diff --git a/user/spectacle/no-wayland.patch b/user/spectacle/no-wayland.patch
index 554e64d34..50c7cc8b7 100644
--- a/user/spectacle/no-wayland.patch
+++ b/user/spectacle/no-wayland.patch
@@ -19,7 +19,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3395c1b..06009f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -68,7 +68,6 @@ find_package(
+@@ -67,7 +67,6 @@ find_package(
NewStuff
GlobalAccel
XmlGui
@@ -31,7 +31,7 @@ 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(
+@@ -87,7 +87,6 @@ target_link_libraries(
KF5::NewStuff
KF5::GlobalAccel
KF5::XmlGui
@@ -52,7 +52,7 @@ index 41e5858..92ced06 100644
#include <QGuiApplication>
#include <QScreen>
#include <QtCore/qmath.h>
-@@ -52,7 +50,7 @@ const int QuickEditor::magZoom = 5;
+@@ -53,7 +51,7 @@ const int QuickEditor::magZoom = 5;
const int QuickEditor::magPixels = 16;
const int QuickEditor::magOffset = 32;
@@ -61,7 +61,7 @@ index 41e5858..92ced06 100644
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
+@@ -91,18 +89,6 @@
dprI = 1.0 / devicePixelRatioF();
setGeometry(0, 0, static_cast<int>(mPixmap.width() * dprI), static_cast<int>(mPixmap.height() * dprI));
@@ -70,18 +70,16 @@ index 41e5858..92ced06 100644
- using namespace KWayland::Client;
- winId();
- auto surface = Surface::fromWindow(windowHandle());
-- if (!surface) {
-- return;
+- if (surface) {
+- PlasmaShellSurface *plasmashellSurface = plasmashell->createSurface(surface, this);
+- plasmashellSurface->setRole(PlasmaShellSurface::Role::Panel);
+- plasmashellSurface->setPanelTakesFocus(true);
+- plasmashellSurface->setPosition(geometry().topLeft());
- }
-- 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()) {
+ if (Settings::rememberLastRectangularRegion() || Settings::alwaysRememberRegion()) {
+ auto savedRect = Settings::cropRegion();
+ QRect cropRegion = QRect(savedRect[0], savedRect[1], savedRect[2], savedRect[3]);
diff --git a/src/QuickEditor/QuickEditor.h b/src/QuickEditor/QuickEditor.h
index 8dd6586..8187995 100644
--- a/src/QuickEditor/QuickEditor.h
@@ -182,11 +180,10 @@ index 3e90a99..8994995 100644
using MainWindowPtr = std::unique_ptr<KSMainWindow>;
using EditorPtr = std::unique_ptr<QuickEditor>;
-@@ -98,4 +92,3 @@ class SpectacleCore: public QObject
+@@ -93,4 +87,3 @@ class SpectacleCore: public QObject
bool mIsGuiInited;
bool mCopyToClipboard;
- KWayland::Client::PlasmaShell *mWaylandPlasmashell;
};
--
2.22.1
-