Commit 6b28a06e authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

platforms/wayland: Emit outputEnabled() signal

Otherwise the QPA won't create QPlatformScreens and the compositor may
not work as expected.


(cherry picked from commit 2ce49877)
parent 21443ff6
......@@ -474,7 +474,7 @@ WaylandBackend::~WaylandBackend()
delete m_waylandCursor;
m_eventQueue->release();
qDeleteAll(m_outputs);
destroyOutputs();
if (m_xdgShell) {
m_xdgShell->release();
......@@ -625,8 +625,7 @@ void WaylandBackend::initConnection()
delete m_seat;
m_shm->destroy();
qDeleteAll(m_outputs);
m_outputs.clear();
destroyOutputs();
if (m_xdgShell) {
m_xdgShell->destroy();
......@@ -730,11 +729,23 @@ void WaylandBackend::createOutputs()
logicalWidthSum += logicalWidth;
m_outputs << waylandOutput;
emit outputAdded(waylandOutput);
emit outputEnabled(waylandOutput);
}
setReady(true);
emit screensQueried();
}
void WaylandBackend::destroyOutputs()
{
while (!m_outputs.isEmpty()) {
WaylandOutput *output = m_outputs.takeLast();
emit outputDisabled(output);
emit outputRemoved(output);
delete output;
}
}
OpenGLBackend *WaylandBackend::createOpenGLBackend()
{
#if HAVE_WAYLAND_EGL
......
......@@ -209,6 +209,7 @@ Q_SIGNALS:
private:
void initConnection();
void createOutputs();
void destroyOutputs();
void updateScreenSize(WaylandOutput *output);
void relativeMotionHandler(const QSizeF &delta, const QSizeF &deltaNonAccelerated, quint64 timestamp);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment