Compare commits

...

4 Commits

Author SHA1 Message Date
078f36f8f3 Update version number for 5.92.0
GIT_SILENT
2024-01-10 12:29:03 +00:00
7d3194034c Use ECM QML module so the module can be used outside of repository 2024-01-04 14:42:17 -05:00
e3098a660a Fix constrained check
The value in parantheses was always zero.
2023-12-21 13:58:24 +00:00
d379bc8d8e Update version number for 5.91.90
GIT_SILENT
2023-12-20 18:54:50 +00:00
3 changed files with 7 additions and 4 deletions

View File

@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(layershellqt) project(layershellqt)
set(PROJECT_VERSION "5.91.0") set(PROJECT_VERSION "5.92.0")
set(PROJECT_VERSION_MAJOR 6) set(PROJECT_VERSION_MAJOR 6)
set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD 99)
@ -30,6 +30,7 @@ include(FeatureSummary)
include(GenerateExportHeader) include(GenerateExportHeader)
include(KDEClangFormat) include(KDEClangFormat)
include(ECMQtDeclareLoggingCategory) include(ECMQtDeclareLoggingCategory)
include(ECMQmlModule)
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient Qml) find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient Qml)

View File

@ -1,9 +1,10 @@
# SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleix.pol_gonzalez@mercedes-benz.com> # SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleix.pol_gonzalez@mercedes-benz.com>
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
qt_add_qml_module(LayerShellQtQml ecm_add_qml_module(LayerShellQtQml
URI "org.kde.layershell" URI "org.kde.layershell"
VERSION 1.0 VERSION 1.0
SOURCES layershellqtplugin.cpp) SOURCES layershellqtplugin.cpp)
target_link_libraries(LayerShellQtQml PRIVATE Qt::Qml LayerShellQtInterface) target_link_libraries(LayerShellQtQml PRIVATE Qt::Qml LayerShellQtInterface)
ecm_finalize_qml_module(LayerShellQtQml DESTINATION ${KDE_INSTALL_QMLDIR})

View File

@ -119,6 +119,7 @@ void QWaylandLayerSurface::applyConfigure()
void QWaylandLayerSurface::setAnchor(uint anchor) void QWaylandLayerSurface::setAnchor(uint anchor)
{ {
set_anchor(anchor); set_anchor(anchor);
setWindowGeometry(window()->windowContentGeometry());
} }
void QWaylandLayerSurface::setExclusiveZone(int32_t zone) void QWaylandLayerSurface::setExclusiveZone(int32_t zone)
@ -144,8 +145,8 @@ void QWaylandLayerSurface::setLayer(uint32_t layer)
void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry) void QWaylandLayerSurface::setWindowGeometry(const QRect &geometry)
{ {
const bool horizontallyConstrained = m_interface->anchors() & (Window::AnchorLeft & Window::AnchorRight); const bool horizontallyConstrained = m_interface->anchors().testFlags({Window::AnchorLeft, Window::AnchorRight});
const bool verticallyConstrained = m_interface->anchors() & (Window::AnchorTop & Window::AnchorBottom); const bool verticallyConstrained = m_interface->anchors().testFlags({Window::AnchorTop, Window::AnchorBottom});
QSize size = geometry.size(); QSize size = geometry.size();
if (horizontallyConstrained) { if (horizontallyConstrained) {