mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-14 02:54:31 -04:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
9ace3c834d | |||
2851951f97 | |||
5a6d22d792 | |||
cac5b2eebb | |||
21fd8ca8af | |||
da9fe6c72e | |||
f1a7f99a4a |
@ -4,13 +4,13 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(layershellqt)
|
||||
set(PROJECT_VERSION "6.2.2")
|
||||
set(PROJECT_VERSION "6.1.5")
|
||||
set(PROJECT_VERSION_MAJOR 6)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
set(QT_MIN_VERSION "6.7.0")
|
||||
set(KF6_MIN_VERSION "6.5.0")
|
||||
set(QT_MIN_VERSION "6.6.0")
|
||||
set(KF6_MIN_VERSION "6.2.0")
|
||||
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
@ -4,16 +4,10 @@
|
||||
remove_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS)
|
||||
|
||||
add_library(LayerShellQtInterface)
|
||||
|
||||
if (Qt6_VERSION VERSION_GREATER_EQUAL "6.8.0")
|
||||
set(private_code_option "PRIVATE_CODE")
|
||||
endif()
|
||||
qt6_generate_wayland_protocol_client_sources(LayerShellQtInterface
|
||||
${private_code_option}
|
||||
FILES
|
||||
${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml
|
||||
${WaylandProtocols_DATADIR}/staging/xdg-activation/xdg-activation-v1.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wlr-layer-shell-unstable-v1.xml
|
||||
qt6_generate_wayland_protocol_client_sources(LayerShellQtInterface FILES
|
||||
${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml
|
||||
${WaylandProtocols_DATADIR}/staging/xdg-activation/xdg-activation-v1.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wlr-layer-shell-unstable-v1.xml
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(LayerShellQtInterface
|
||||
|
@ -110,13 +110,9 @@ void QWaylandLayerSurface::attachPopup(QtWaylandClient::QWaylandShellSurface *po
|
||||
|
||||
void QWaylandLayerSurface::applyConfigure()
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
||||
m_configuring = true;
|
||||
#endif
|
||||
window()->resizeFromApplyConfigure(m_pendingSize);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
||||
m_configuring = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void QWaylandLayerSurface::setDesiredSize(const QSize &size)
|
||||
@ -167,7 +163,6 @@ void QWaylandLayerSurface::setLayer(uint32_t layer)
|
||||
set_layer(layer);
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
||||
void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
|
||||
{
|
||||
if (m_configuring) {
|
||||
@ -176,12 +171,6 @@ void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
|
||||
|
||||
setDesiredSize(geometry.size());
|
||||
}
|
||||
#else
|
||||
void QWaylandLayerSurface::setWindowSize(const QSize &size)
|
||||
{
|
||||
setDesiredSize(size);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool QWaylandLayerSurface::requestActivate()
|
||||
{
|
||||
@ -231,10 +220,8 @@ void QWaylandLayerSurface::sendExpose()
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
|
||||
window()->handleExpose(QRect(QPoint(), m_pendingSize));
|
||||
#elif QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
||||
window()->sendRecursiveExposeEvent();
|
||||
#else
|
||||
window()->updateExposure();
|
||||
window()->sendRecursiveExposeEvent();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -43,11 +43,7 @@ public:
|
||||
void setLayer(uint32_t layer);
|
||||
|
||||
void applyConfigure() override;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
||||
void setWindowGeometry(const QRect &geometry) override;
|
||||
#else
|
||||
void setWindowSize(const QSize &size) override;
|
||||
#endif
|
||||
|
||||
bool requestActivate() override;
|
||||
void setXdgActivationToken(const QString &token) override;
|
||||
@ -65,9 +61,7 @@ private:
|
||||
QString m_activationToken;
|
||||
|
||||
bool m_configured = false;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
||||
bool m_configuring = false;
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user