summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/mockcompositor.cpp
diff options
context:
space:
mode:
authorPier Luigi Fiorini <pierluigi.fiorini@liri.io>2018-06-13 22:11:00 +0200
committerPier Luigi Fiorini <pierluigi.fiorini@liri.io>2018-11-05 07:51:14 +0000
commit7945996fe4360f12a96faad7718325b2a66774b4 (patch)
treeba3061ec7eead3f679e3dafc7c33e7baa8eb1ecb /tests/auto/client/shared/mockcompositor.cpp
parentf2f2c2e9e47e777298a76772a3c92fc7c3fe9921 (diff)
Client: Add fullscreen shell integration
[ChangeLog][QPA plugin] Added support for fullscreen-shell unstable v1. The fullscreen_shell_unstable_v1 interface displays a single surface per output and it is used for nested compositors, where each output is rendered in a surface that is then displayed by the main compositor. For example weston could be the main compositor and a QML compositor could be launched as a client using this shell integration to display it inside weston. Change-Id: I037679a283ff03cb4bdf4b3fed59945090ec9250 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'tests/auto/client/shared/mockcompositor.cpp')
-rw-r--r--tests/auto/client/shared/mockcompositor.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/client/shared/mockcompositor.cpp b/tests/auto/client/shared/mockcompositor.cpp
index 797c05c44..df24b4091 100644
--- a/tests/auto/client/shared/mockcompositor.cpp
+++ b/tests/auto/client/shared/mockcompositor.cpp
@@ -299,6 +299,16 @@ QSharedPointer<MockXdgToplevelV6> MockCompositor::xdgToplevelV6(int index)
return result;
}
+QSharedPointer<MockSurface> MockCompositor::fullScreenShellV1Surface(int index)
+{
+ QSharedPointer<MockSurface> result;
+ lock();
+ if (Impl::Surface *surface = m_compositor->fullScreenShellV1()->surfaces().value(index, nullptr))
+ result = surface->mockSurface();
+ unlock();
+ return result;
+}
+
MockCompositor::Command MockCompositor::makeCommand(Command::Callback callback, void *target)
{
Command command;
@@ -382,6 +392,7 @@ Compositor::Compositor()
m_iviApplication.reset(new IviApplication(m_display));
m_wlShell.reset(new WlShell(m_display));
m_xdgShellV6.reset(new XdgShellV6(m_display));
+ m_fullScreenShellV1.reset(new FullScreenShellV1(m_display));
m_loop = wl_display_get_event_loop(m_display);
m_fd = wl_event_loop_get_fd(m_loop);
@@ -459,6 +470,11 @@ XdgShellV6 *Compositor::xdgShellV6() const
return m_xdgShellV6.data();
}
+FullScreenShellV1 *Compositor::fullScreenShellV1() const
+{
+ return m_fullScreenShellV1.data();
+}
+
uint32_t Compositor::nextSerial()
{
return wl_display_next_serial(m_display);
@@ -474,6 +490,7 @@ void Compositor::removeSurface(Surface *surface)
m_surfaces.removeOne(surface);
m_keyboard->handleSurfaceDestroyed(surface);
m_pointer->handleSurfaceDestroyed(surface);
+ m_fullScreenShellV1->removeSurface(surface);
}
Surface *Compositor::resolveSurface(const QVariant &v)