Commit 13b631ea authored by Roman Gilg's avatar Roman Gilg
Browse files

fix(kwayland): move blocking tablet init before timer start

Summary:
On init of the tablet mode the d-bus connection to KWin for receiving tablet
mode information is blocking for some reason for over one second. This leads
to the single shot timer timing out before the Wayland interfaces can be
received.

For now move the blocking call before the timer is started such that we do
not fail anymore.

Note that the d-bus call is only blocking unusual long on session startup.
Later d-bus calls return without prolonged delay.

Test Plan: Starts without seg fault on output management object in applyConfig.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26658
parent f5ac835c
......@@ -48,8 +48,9 @@ WaylandConfig::WaylandConfig(QObject *parent)
, m_tabletModeAvailable(false)
, m_tabletModeEngaged(false)
{
connect(this, &WaylandConfig::initialized, &m_syncLoop, &QEventLoop::quit);
initKWinTabletMode();
connect(this, &WaylandConfig::initialized, &m_syncLoop, &QEventLoop::quit);
QTimer::singleShot(1000, this, [this] {
if (m_syncLoop.isRunning()) {
qCWarning(KSCREEN_WAYLAND) << "Connection to Wayland server at socket:"
......@@ -60,7 +61,6 @@ WaylandConfig::WaylandConfig(QObject *parent)
}
});
initKWinTabletMode();
initConnection();
m_syncLoop.exec();
}
......
Markdown is supported
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