mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-14 11:04:20 -04:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
c18d8d63df | |||
e82e03a9cc | |||
7df446ed15 |
@ -2,8 +2,8 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
include:
|
||||
- project: sysadmin/ci-utilities
|
||||
file:
|
||||
- /gitlab-templates/reuse-lint.yml
|
||||
- /gitlab-templates/linux.yml
|
||||
- /gitlab-templates/freebsd.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/reuse-lint.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd-qt6.yml
|
||||
|
@ -4,13 +4,13 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(layershellqt)
|
||||
set(PROJECT_VERSION "5.27.12")
|
||||
set(PROJECT_VERSION "5.26.2")
|
||||
set(PROJECT_VERSION_MAJOR 5)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
set(QT_MIN_VERSION "5.15.2")
|
||||
set(KF5_MIN_VERSION "5.102.0")
|
||||
set(KF5_MIN_VERSION "5.98.0")
|
||||
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
@ -23,7 +23,6 @@ include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
include(ECMSetupVersion)
|
||||
include(ECMDeprecationSettings)
|
||||
include(ECMGenerateHeaders)
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(FeatureSummary)
|
||||
@ -31,7 +30,6 @@ include(GenerateExportHeader)
|
||||
include(KDEClangFormat)
|
||||
include(ECMQtDeclareLoggingCategory)
|
||||
|
||||
|
||||
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient Qml)
|
||||
if (QT_MAJOR_VERSION EQUAL "5")
|
||||
find_package(Qt5XkbCommonSupport REQUIRED PRIVATE)
|
||||
@ -55,15 +53,10 @@ ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX LAYERSHELLQT
|
||||
|
||||
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
|
||||
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
|
||||
|
||||
ecm_set_disabled_deprecation_versions(QT 5.15.2
|
||||
KF 5.101
|
||||
)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
|
||||
set(CMAKECONFIG_INSTALL_DIR ${KDE_INSTALL_CMAKEPACKAGEDIR}/LayerShellQt)
|
||||
set(CMAKECONFIG_INSTALL_DIR ${KDE_INSTALL_LIBDIR}/cmake/LayerShellQt)
|
||||
install(EXPORT LayerShellQtTargets
|
||||
NAMESPACE LayerShellQt::
|
||||
DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <layershellqt_logging.h>
|
||||
|
||||
#include <QPointer>
|
||||
#include <optional>
|
||||
|
||||
using namespace LayerShellQt;
|
||||
|
||||
@ -27,7 +26,7 @@ public:
|
||||
Window::KeyboardInteractivity keyboardInteractivity = Window::KeyboardInteractivityExclusive;
|
||||
Window::Layer layer = Window::LayerTop;
|
||||
QMargins margins;
|
||||
std::optional<QPointer<QScreen>> desiredOutput;
|
||||
QPointer<QScreen> desiredOutput;
|
||||
};
|
||||
|
||||
static QMap<QWindow *, Window *> s_map;
|
||||
@ -104,12 +103,7 @@ Window::Layer Window::layer() const
|
||||
|
||||
QScreen *Window::desiredOutput() const
|
||||
{
|
||||
// Don't use .value_or here to avoid a temporary QPointer
|
||||
if (d->desiredOutput.has_value()) {
|
||||
return d->desiredOutput.value();
|
||||
}
|
||||
|
||||
return d->parentWindow->screen();
|
||||
return d->desiredOutput;
|
||||
}
|
||||
|
||||
void Window::setDesiredOutput(QScreen *output)
|
||||
|
Reference in New Issue
Block a user