summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-28 12:05:09 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-11-12 13:34:05 +0100
commitd58008c4310f99d0faebcfb2fd9aa9296b813ecf (patch)
tree7aee8434512b2142c4a604e688488a051464189b /src/plugins
parentacddf1834ffa1b256a38919d9626f1e12460b484 (diff)
downloadqtwayland-d58008c4310f99d0faebcfb2fd9aa9296b813ecf.tar.gz
Client: Support running with no screens
[ChangeLog][QPA plugin] The QPA plugin now supports running with no screens attached. This is handled by adding a fake screen when the last screen is disconnected, similarly to what the other QPA plugins do. Fixes: QTBUG-79111 Change-Id: I4a0e023ae784217dd030f0c62f12487fdff4825c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp
index 26f59889..636ef080 100644
--- a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp
@@ -50,10 +50,11 @@ QWaylandFullScreenShellV1Surface::QWaylandFullScreenShellV1Surface(QtWayland::zw
, m_shell(shell)
, m_window(window)
{
- auto screen = static_cast<QWaylandScreen *>(m_window->screen());
+ auto *screen = m_window->waylandScreen();
+ auto *output = screen ? screen->output() : nullptr;
m_shell->present_surface(m_window->wlSurface(),
QtWayland::zwp_fullscreen_shell_v1::present_method_default,
- screen->output());
+ output);
}
} // namespace QtWaylandClient