mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-14 02:54:31 -04:00
Replace Window::desiredOutput with a Window::screenConfiguration enum
To not overlap with QWindow::screen too much, introduce an enum to make it more clear what the options and the resulting behaviour are.
This commit is contained in:
committed by
Vlad Zahorodnii
parent
511b92f4ab
commit
49f31bb22d
@ -23,9 +23,8 @@ QWaylandLayerSurface::QWaylandLayerSurface(QtWayland::zwlr_layer_shell_v1 *shell
|
||||
Q_ASSERT(interface);
|
||||
|
||||
wl_output *output = nullptr;
|
||||
QScreen *screen = interface->desiredOutput();
|
||||
if (screen) {
|
||||
auto waylandScreen = dynamic_cast<QtWaylandClient::QWaylandScreen *>(screen->handle());
|
||||
if (interface->screenConfiguration() == Window::ScreenFromQWindow) {
|
||||
auto waylandScreen = dynamic_cast<QtWaylandClient::QWaylandScreen *>(window->window()->screen()->handle());
|
||||
// Qt will always assign a screen to a window, but if the compositor has no screens available a dummy QScreen object is created
|
||||
// this will not cast to a QWaylandScreen
|
||||
if (!waylandScreen) {
|
||||
|
Reference in New Issue
Block a user