|
diff --git a/CMakeLists.txt b/CMakeLists.txt |
|
index 52b3766..cbd7f4d 100644 |
|
--- a/CMakeLists.txt |
|
+++ b/CMakeLists.txt |
|
@@ -22,9 +22,7 @@ set(LXQTBT_MINIMUM_VERSION "2.2.0") |
|
|
|
find_package(Qt6Network ${QT_MINIMUM_VERSION} REQUIRED) |
|
find_package(Qt6Widgets ${QT_MINIMUM_VERSION} REQUIRED) |
|
-find_package(Qt6WaylandClient ${QT_MINIMUM_VERSION} REQUIRED) |
|
find_package(Qt6LinguistTools ${QT_MINIMUM_VERSION} REQUIRED) |
|
-find_package(LayerShellQt ${SHELLQT_MINIMUM_VERSION} REQUIRED) |
|
find_package(KF6WindowSystem ${KF6_MINIMUM_VERSION} REQUIRED) |
|
find_package(lxqt2-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED) |
|
|
|
@@ -115,8 +113,6 @@ set(SCREENGRAB_SRC |
|
src/core/ui/configwidget.cpp |
|
src/core/ui/about.cpp |
|
src/core/ui/mainwindow.cpp |
|
- src/core/wayland/ScreenCopy.cpp |
|
- src/core/wayland/ScreenShot.cpp |
|
) |
|
|
|
if(SG_DBUS_NOTIFY) |
|
@@ -208,12 +204,7 @@ if (XCB_XFIXES_FOUND) |
|
endif() |
|
|
|
# Link with Network. See pull#86. TODO: Should be optional when upload module is needed. |
|
-target_link_libraries(screengrab qkeysequencewidget Qt6::Widgets KF6::WindowSystem Qt6::Network ${X11_LIBRARIES} |
|
-LayerShellQtInterface Qt6::GuiPrivate Qt6::WaylandClient Qt6::WaylandClientPrivate Qt6::WaylandGlobalPrivate) |
|
- |
|
-qt6_generate_wayland_protocol_client_sources(screengrab FILES |
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/core/wayland/wlr-screencopy-unstable-v1.xml |
|
-) |
|
+target_link_libraries(screengrab qkeysequencewidget Qt6::Widgets KF6::WindowSystem Qt6::Network ${X11_LIBRARIES}) |
|
|
|
# installing |
|
install(TARGETS screengrab RUNTIME DESTINATION bin) |
|
diff --git a/src/core/core.cpp b/src/core/core.cpp |
|
index aa8ac50..80e53b8 100644 |
|
--- a/src/core/core.cpp |
|
+++ b/src/core/core.cpp |
|
@@ -47,7 +47,6 @@ |
|
#include "dbusnotifier.h" |
|
#endif |
|
|
|
-#include "wayland/ScreenShot.h" |
|
|
|
Core* Core::corePtr = nullptr; |
|
|
|
@@ -308,21 +307,6 @@ void Core::waylandScreenShot(bool delayed) |
|
} |
|
default: // for now, we can take only a fullscreen shot |
|
{ |
|
- auto ws = new LXQt::Wayland::ScreenShot(_conf->getIncludeCursor(), |
|
- _wnd->selectedScreen(), |
|
- QRect(), |
|
- this); |
|
- connect(ws, &LXQt::Wayland::ScreenShot::screenShotReady, this, |
|
- [this, ws] (const QPixmap& pixmap) { |
|
- if (!pixmap.isNull()) |
|
- { |
|
- *_pixelMap = pixmap; |
|
- checkAutoSave(); |
|
- _wnd->updatePixmap(_pixelMap); |
|
- } |
|
- showScreenshot(); |
|
- ws->deleteLater(); |
|
- }); |
|
break; |
|
} |
|
} |
|
@@ -330,26 +314,6 @@ void Core::waylandScreenShot(bool delayed) |
|
|
|
void Core::takeWaylandAreaScreenshot(bool checkCursor) |
|
{ |
|
- if (_selector == nullptr) |
|
- return; |
|
- auto ws = new LXQt::Wayland::ScreenShot(checkCursor ? _conf->getIncludeCursor() : false, |
|
- _wnd->selectedScreen(), |
|
- _selector->getSelectionRect(), |
|
- this); |
|
- connect(ws, &LXQt::Wayland::ScreenShot::screenShotReady, this, |
|
- [this, ws] (const QPixmap& pixmap) { |
|
- if (!pixmap.isNull()) |
|
- { |
|
- *_pixelMap = pixmap; |
|
- checkAutoSave(); |
|
- _wnd->updatePixmap(_pixelMap); |
|
- } |
|
- showScreenshot(); |
|
- _lastSelectedArea = _selector->getSelectionRect(); |
|
- _selector->deleteLater(); |
|
- _selector = nullptr; |
|
- ws->deleteLater(); |
|
- }); |
|
} |
|
|
|
void Core::showScreenshot() |
|
diff --git a/src/core/regionselect.cpp b/src/core/regionselect.cpp |
|
index 3cfd85e..89c0da2 100644 |
|
--- a/src/core/regionselect.cpp |
|
+++ b/src/core/regionselect.cpp |
|
@@ -20,8 +20,6 @@ |
|
|
|
#include <QApplication> |
|
|
|
-#include <LayerShellQt/shell.h> |
|
-#include <LayerShellQt/window.h> |
|
|
|
RegionSelect::RegionSelect(Config *mainconf, QScreen *screen, QWidget *parent) |
|
:QWidget(parent) |
|
@@ -113,26 +111,6 @@ void RegionSelect::sharedInit() |
|
|
|
void RegionSelect::showEvent(QShowEvent *event) |
|
{ |
|
- if (QGuiApplication::platformName() == QStringLiteral("wayland")) |
|
- { |
|
- winId(); |
|
- if (QWindow* win = windowHandle()) |
|
- { |
|
- if (LayerShellQt::Window* layershell = LayerShellQt::Window::get(win)) |
|
- { |
|
- layershell->setLayer(LayerShellQt::Window::Layer::LayerOverlay); |
|
- LayerShellQt::Window::Anchors anchors = {LayerShellQt::Window::AnchorTop |
|
- | LayerShellQt::Window::AnchorBottom |
|
- | LayerShellQt::Window::AnchorLeft |
|
- | LayerShellQt::Window::AnchorRight}; |
|
- layershell->setAnchors(anchors); |
|
- layershell->setKeyboardInteractivity(LayerShellQt::Window::KeyboardInteractivityExclusive); |
|
- layershell->setExclusiveZone(-1); // not moved to accommodate for other surfaces |
|
- win->setScreen(_selectedScreen == nullptr ? qApp->primaryScreen() : _selectedScreen); |
|
- layershell->setScreenConfiguration(LayerShellQt::Window::ScreenConfiguration::ScreenFromQWindow); |
|
- } |
|
- } |
|
- } |
|
QWidget::showEvent(event); |
|
} |
|
|
If you use a VLC version at this commit or newer, the VLC patch is no longer required.
Reportedly, the edge case that resulted in upstream accepting a change to support building without having Wayland installed, was a MacOS build, so this is an example of a fix for a popular closed-source use-case having a beneficial side effect for an obscure fully-open-source use-case (pure Xorg).
In the future, maybe continued popular use of MacOS alongside Wayland like that will preserve the ecosystem diversity sufficiently to make backporting software to pure Xorg a little bit easier from time to time, as pure Xorg gradually loses more popularity.