Compare commits

...

10 Commits

Author SHA1 Message Date
Jonathan Esk-Riddell
ee7ccc4fb8 Update version number for 5.27.7
GIT_SILENT
2023-08-01 10:03:25 +01:00
Jonathan Esk-Riddell
d610813bac Update version number for 5.27.6
GIT_SILENT
2023-06-20 14:02:45 +01:00
Jonathan Esk-Riddell
debc455bd5 Update version number for 5.27.5
GIT_SILENT
2023-05-09 12:18:32 +01:00
Jonathan Esk-Riddell
b2dcb1acff Update version number for 5.27.4
GIT_SILENT
2023-04-04 11:21:08 +01:00
Jonathan Esk-Riddell
94eb90d823 Update version number for 5.27.3
GIT_SILENT
2023-03-14 11:53:20 +00:00
Jonathan Esk-Riddell
dac784828f Update version number for 5.27.2
GIT_SILENT
2023-02-28 12:01:30 +00:00
Fabian Vogt
ddc4aead87 Use the QScreen of the QWindow as default output
If the Window::setDesiredOutput API was not called for the QWindow, use
QWindow::screen(). This allows assigning QWindows to specific screens using
the plain Qt API.

Passing nullptr to Window::setDesiredOutput explicitly results in nil as
desired output for the layer, which lets the compositor select a screen.

(cherry picked from commit 3c85e2e8899d1253430783a618d7584d985bd614)
2023-02-23 09:38:55 +01:00
Jonathan Esk-Riddell
7a862bdcd4 Update version number for 5.27.1
GIT_SILENT
2023-02-21 11:05:04 +00:00
Jonathan Esk-Riddell
b758105bd7 Update version number for 5.27.0
GIT_SILENT
2023-02-09 11:41:27 +00:00
Jonathan Esk-Riddell
79441811ff Update kf5 version requirement to 5.102.0
GIT_SILENT
2023-01-21 20:17:53 +00:00
2 changed files with 10 additions and 4 deletions

View File

@ -4,13 +4,13 @@
cmake_minimum_required(VERSION 3.16)
project(layershellqt)
set(PROJECT_VERSION "5.26.90")
set(PROJECT_VERSION "5.27.7")
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)

View File

@ -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)