mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-06-04 01:28:35 -04:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
395a913581 | ||
|
fd588d520b | ||
|
204645bae9 | ||
|
de99581bae | ||
|
99aa6c62a7 | ||
|
a09d4c532d | ||
|
ee7ccc4fb8 | ||
|
d610813bac | ||
|
debc455bd5 | ||
|
b2dcb1acff | ||
|
94eb90d823 | ||
|
dac784828f | ||
|
ddc4aead87 | ||
|
7a862bdcd4 | ||
|
b758105bd7 | ||
|
79441811ff |
@ -2,8 +2,8 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
include:
|
||||
- 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
|
||||
- project: sysadmin/ci-utilities
|
||||
file:
|
||||
- /gitlab-templates/reuse-lint.yml
|
||||
- /gitlab-templates/linux.yml
|
||||
- /gitlab-templates/freebsd.yml
|
||||
|
@ -4,13 +4,13 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(layershellqt)
|
||||
set(PROJECT_VERSION "5.26.90")
|
||||
set(PROJECT_VERSION "5.27.12")
|
||||
set(PROJECT_VERSION_MAJOR 5)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
set(QT_MIN_VERSION "5.15.2")
|
||||
set(KF5_MIN_VERSION "5.98.0")
|
||||
set(KF5_MIN_VERSION "5.102.0")
|
||||
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <layershellqt_logging.h>
|
||||
|
||||
#include <QPointer>
|
||||
#include <optional>
|
||||
|
||||
using namespace LayerShellQt;
|
||||
|
||||
@ -26,7 +27,7 @@ public:
|
||||
Window::KeyboardInteractivity keyboardInteractivity = Window::KeyboardInteractivityExclusive;
|
||||
Window::Layer layer = Window::LayerTop;
|
||||
QMargins margins;
|
||||
QPointer<QScreen> desiredOutput;
|
||||
std::optional<QPointer<QScreen>> desiredOutput;
|
||||
};
|
||||
|
||||
static QMap<QWindow *, Window *> s_map;
|
||||
@ -103,7 +104,12 @@ Window::Layer Window::layer() const
|
||||
|
||||
QScreen *Window::desiredOutput() const
|
||||
{
|
||||
return d->desiredOutput;
|
||||
// Don't use .value_or here to avoid a temporary QPointer
|
||||
if (d->desiredOutput.has_value()) {
|
||||
return d->desiredOutput.value();
|
||||
}
|
||||
|
||||
return d->parentWindow->screen();
|
||||
}
|
||||
|
||||
void Window::setDesiredOutput(QScreen *output)
|
||||
|
Loading…
x
Reference in New Issue
Block a user