mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-06-04 01:28:35 -04:00
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
de99581bae | ||
|
99aa6c62a7 | ||
|
a09d4c532d | ||
|
ee7ccc4fb8 | ||
|
d610813bac | ||
|
debc455bd5 | ||
|
b2dcb1acff | ||
|
94eb90d823 | ||
|
dac784828f | ||
|
ddc4aead87 | ||
|
7a862bdcd4 | ||
|
b758105bd7 | ||
|
79441811ff |
@ -4,13 +4,13 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
project(layershellqt)
|
project(layershellqt)
|
||||||
set(PROJECT_VERSION "5.26.90")
|
set(PROJECT_VERSION "5.27.10")
|
||||||
set(PROJECT_VERSION_MAJOR 5)
|
set(PROJECT_VERSION_MAJOR 5)
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
set(QT_MIN_VERSION "5.15.2")
|
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(KDE_COMPILERSETTINGS_LEVEL "5.82")
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <layershellqt_logging.h>
|
#include <layershellqt_logging.h>
|
||||||
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
using namespace LayerShellQt;
|
using namespace LayerShellQt;
|
||||||
|
|
||||||
@ -26,7 +27,7 @@ public:
|
|||||||
Window::KeyboardInteractivity keyboardInteractivity = Window::KeyboardInteractivityExclusive;
|
Window::KeyboardInteractivity keyboardInteractivity = Window::KeyboardInteractivityExclusive;
|
||||||
Window::Layer layer = Window::LayerTop;
|
Window::Layer layer = Window::LayerTop;
|
||||||
QMargins margins;
|
QMargins margins;
|
||||||
QPointer<QScreen> desiredOutput;
|
std::optional<QPointer<QScreen>> desiredOutput;
|
||||||
};
|
};
|
||||||
|
|
||||||
static QMap<QWindow *, Window *> s_map;
|
static QMap<QWindow *, Window *> s_map;
|
||||||
@ -103,7 +104,12 @@ Window::Layer Window::layer() const
|
|||||||
|
|
||||||
QScreen *Window::desiredOutput() 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)
|
void Window::setDesiredOutput(QScreen *output)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user