Compare commits

..
Author SHA1 Message Date
Aleix Pol Gonzalez 7409bd4cc0 Make sure that the layer property gets initialised
Much like with the rest of the properties, we should set whichever value
was in the interface and then subscribe to changes in the property.
Otherwise, the layer doesn't get forwarded to the surface if the value
was set before its initialisation.

Signed-off-by: Victoria Fischer <[email protected]>
2024-09-24 15:06:13 +02:00
Jonathan Riddell 2dbd1d6eb7 Update Frameworks version requirement to 6.5.0
GIT_SILENT
2024-09-12 11:08:45 +01:00
Jonathan Riddell 0d11058c8f update version for new release 2024-09-12 10:50:16 +01:00
David Redondo a5fbaa5975 Reformat CMake code for better readability 2024-08-14 11:08:41 +02:00
David Redondo 6f8a3f5d42 Generate wayland code with PRIVATE_CODE 2024-08-14 10:47:07 +02:00
Jonathan Riddell 303f68cf10 Update Qt version requirement to 6.7.0
GIT_SILENT
2024-08-02 10:15:46 +01:00
Vlad Zahorodnii 368cf2dd37 Port to QWaylandWindow::updateExposure() 2024-07-05 09:49:38 +03:00
Vlad Zahorodnii 16a1debdca Port to QWaylandShellSurface::setWindowSize() 2024-06-26 13:01:50 +03:00
Jonathan Riddell c4987c01c7 update version for new release 2024-05-24 16:14:22 +01:00
4 changed files with 34 additions and 8 deletions
+3 -3
View File
@@ -4,13 +4,13 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(layershellqt) project(layershellqt)
set(PROJECT_VERSION "6.1.3") set(PROJECT_VERSION "6.1.90")
set(PROJECT_VERSION_MAJOR 6) set(PROJECT_VERSION_MAJOR 6)
set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD 99)
set(QT_MIN_VERSION "6.6.0") set(QT_MIN_VERSION "6.7.0")
set(KF6_MIN_VERSION "6.2.0") set(KF6_MIN_VERSION "6.5.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.82") set(KDE_COMPILERSETTINGS_LEVEL "5.82")
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
+10 -4
View File
@@ -4,10 +4,16 @@
remove_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS) remove_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS)
add_library(LayerShellQtInterface) add_library(LayerShellQtInterface)
qt6_generate_wayland_protocol_client_sources(LayerShellQtInterface FILES
${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml if (Qt6_VERSION VERSION_GREATER_EQUAL "6.8.0")
${WaylandProtocols_DATADIR}/staging/xdg-activation/xdg-activation-v1.xml set(private_code_option "PRIVATE_CODE")
${CMAKE_CURRENT_SOURCE_DIR}/wlr-layer-shell-unstable-v1.xml 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
) )
ecm_qt_declare_logging_category(LayerShellQtInterface ecm_qt_declare_logging_category(LayerShellQtInterface
+15 -1
View File
@@ -37,6 +37,7 @@ QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShellIntegration *shell,
} }
} }
init(shell->get_layer_surface(window->waylandSurface()->object(), output, m_interface->layer(), m_interface->scope())); init(shell->get_layer_surface(window->waylandSurface()->object(), output, m_interface->layer(), m_interface->scope()));
setLayer(m_interface->layer());
connect(m_interface, &Window::layerChanged, this, [this]() { connect(m_interface, &Window::layerChanged, this, [this]() {
setLayer(m_interface->layer()); setLayer(m_interface->layer());
}); });
@@ -110,9 +111,13 @@ void QWaylandLayerSurface::attachPopup(QtWaylandClient::QWaylandShellSurface *po
void QWaylandLayerSurface::applyConfigure() void QWaylandLayerSurface::applyConfigure()
{ {
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
m_configuring = true; m_configuring = true;
#endif
window()->resizeFromApplyConfigure(m_pendingSize); window()->resizeFromApplyConfigure(m_pendingSize);
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
m_configuring = false; m_configuring = false;
#endif
} }
void QWaylandLayerSurface::setDesiredSize(const QSize &size) void QWaylandLayerSurface::setDesiredSize(const QSize &size)
@@ -163,6 +168,7 @@ void QWaylandLayerSurface::setLayer(uint32_t layer)
set_layer(layer); set_layer(layer);
} }
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry) void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
{ {
if (m_configuring) { if (m_configuring) {
@@ -171,6 +177,12 @@ void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
setDesiredSize(geometry.size()); setDesiredSize(geometry.size());
} }
#else
void QWaylandLayerSurface::setWindowSize(const QSize &size)
{
setDesiredSize(size);
}
#endif
bool QWaylandLayerSurface::requestActivate() bool QWaylandLayerSurface::requestActivate()
{ {
@@ -220,8 +232,10 @@ void QWaylandLayerSurface::sendExpose()
{ {
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) #if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
window()->handleExpose(QRect(QPoint(), m_pendingSize)); window()->handleExpose(QRect(QPoint(), m_pendingSize));
#else #elif QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
window()->sendRecursiveExposeEvent(); window()->sendRecursiveExposeEvent();
#else
window()->updateExposure();
#endif #endif
} }
+6
View File
@@ -43,7 +43,11 @@ public:
void setLayer(uint32_t layer); void setLayer(uint32_t layer);
void applyConfigure() override; void applyConfigure() override;
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
void setWindowGeometry(const QRect &geometry) override; void setWindowGeometry(const QRect &geometry) override;
#else
void setWindowSize(const QSize &size) override;
#endif
bool requestActivate() override; bool requestActivate() override;
void setXdgActivationToken(const QString &token) override; void setXdgActivationToken(const QString &token) override;
@@ -61,7 +65,9 @@ private:
QString m_activationToken; QString m_activationToken;
bool m_configured = false; bool m_configured = false;
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
bool m_configuring = false; bool m_configuring = false;
#endif
}; };
} }