mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2026-01-15 19:23:36 -05:00
Compare commits
5 Commits
work/zzag/
...
Plasma/6.6
| Author | SHA1 | Date | |
|---|---|---|---|
| 94ac4be08f | |||
| df03deab5c | |||
| 44fe89b1b6 | |||
| 58f549d136 | |||
| 9ddf87a444 |
@ -4,13 +4,13 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(layershellqt)
|
||||
set(PROJECT_VERSION "6.5.80")
|
||||
set(PROJECT_VERSION "6.5.90")
|
||||
set(PROJECT_VERSION_MAJOR 6)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
set(QT_MIN_VERSION "6.9.0")
|
||||
set(KF6_MIN_VERSION "6.18.0")
|
||||
set(QT_MIN_VERSION "6.10.0")
|
||||
set(KF6_MIN_VERSION "6.22.0")
|
||||
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
@ -32,6 +32,7 @@ include(KDEClangFormat)
|
||||
include(ECMQtDeclareLoggingCategory)
|
||||
include(ECMQmlModule)
|
||||
include(KDEGitCommitHooks)
|
||||
include(ECMGenerateExportHeader)
|
||||
|
||||
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient Qml)
|
||||
|
||||
|
||||
@ -64,10 +64,12 @@ ecm_generate_headers(LayerShellQt_HEADERS
|
||||
)
|
||||
|
||||
|
||||
generate_export_header(LayerShellQtInterface
|
||||
ecm_generate_export_header(LayerShellQtInterface
|
||||
BASE_NAME LayerShellQtInterface
|
||||
EXPORT_MACRO_NAME LAYERSHELLQT_EXPORT
|
||||
EXPORT_FILE_NAME LayerShellQt/layershellqt_export.h
|
||||
VERSION ${LAYERSHELLQT_VERSION}
|
||||
DEPRECATION_VERSIONS 6.6
|
||||
)
|
||||
|
||||
install(TARGETS layer-shell
|
||||
|
||||
@ -5,6 +5,9 @@
|
||||
*/
|
||||
|
||||
#include "shell.h"
|
||||
|
||||
#if LAYERSHELLQTINTERFACE_BUILD_DEPRECATED_SINCE(6, 6)
|
||||
|
||||
#include <QByteArray>
|
||||
#include <layershellqt_logging.h>
|
||||
#include <qglobal.h>
|
||||
@ -18,3 +21,4 @@ void Shell::useLayerShell()
|
||||
qCDebug(LAYERSHELLQT) << "Unable to set QT_WAYLAND_SHELL_INTEGRATION=layer-shell";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -8,7 +8,9 @@
|
||||
#define LAYERSHELLQTSHELL_H
|
||||
|
||||
#include "layershellqt_export.h"
|
||||
#include "window.h"
|
||||
|
||||
#if LAYERSHELLQTINTERFACE_ENABLE_DEPRECATED_SINCE(6, 6)
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace LayerShellQt
|
||||
@ -19,9 +21,11 @@ namespace LayerShellQt
|
||||
class LAYERSHELLQT_EXPORT Shell
|
||||
{
|
||||
public:
|
||||
LAYERSHELLQTINTERFACE_DEPRECATED_VERSION(6, 6, "Calling useLayerShell is not needed since Qt 6.5")
|
||||
static void useLayerShell();
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
#include "qwaylandlayersurface_p.h"
|
||||
#include "qwaylandxdgactivationv1_p.h"
|
||||
|
||||
#include <QtWaylandClient/private/qwaylandinputdevice_p.h>
|
||||
#include <QtWaylandClient/private/qwaylandscreen_p.h>
|
||||
#include <QtWaylandClient/private/qwaylandsurface_p.h>
|
||||
#include <QtWaylandClient/private/qwaylandwindow_p.h>
|
||||
@ -200,7 +201,7 @@ bool QWaylandLayerSurface::requestActivate()
|
||||
const auto focusWindow = QGuiApplication::focusWindow();
|
||||
const auto wlWindow = focusWindow ? static_cast<QtWaylandClient::QWaylandWindow *>(focusWindow->handle()) : window();
|
||||
if (const auto seat = wlWindow->display()->lastInputDevice()) {
|
||||
const auto tokenProvider = activation->requestXdgActivationToken(wlWindow->display(), wlWindow->wlSurface(), 0, QString());
|
||||
const auto tokenProvider = activation->requestXdgActivationToken(wlWindow->display(), wlWindow->wlSurface(), seat->serial(), QString());
|
||||
connect(tokenProvider, &QWaylandXdgActivationTokenV1::done, this, [this](const QString &token) {
|
||||
m_shell->activation()->activate(token, window()->wlSurface());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user