Changeset View
Changeset View
Standalone View
Standalone View
backends/kwayland/waylandconfig.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 40 | WaylandConfig::WaylandConfig(QObject *parent) | |||
---|---|---|---|---|---|
43 | , m_registryInitialized(false) | 43 | , m_registryInitialized(false) | ||
44 | , m_blockSignals(true) | 44 | , m_blockSignals(true) | ||
45 | , m_kscreenConfig(new Config) | 45 | , m_kscreenConfig(new Config) | ||
46 | , m_kscreenPendingConfig(nullptr) | 46 | , m_kscreenPendingConfig(nullptr) | ||
47 | , m_screen(new WaylandScreen(this)) | 47 | , m_screen(new WaylandScreen(this)) | ||
48 | , m_tabletModeAvailable(false) | 48 | , m_tabletModeAvailable(false) | ||
49 | , m_tabletModeEngaged(false) | 49 | , m_tabletModeEngaged(false) | ||
50 | { | 50 | { | ||
51 | connect(this, &WaylandConfig::initialized, &m_syncLoop, &QEventLoop::quit); | 51 | initKWinTabletMode(); | ||
52 | 52 | | |||
53 | connect(this, &WaylandConfig::initialized, &m_syncLoop, &QEventLoop::quit); | ||||
53 | QTimer::singleShot(1000, this, [this] { | 54 | QTimer::singleShot(1000, this, [this] { | ||
54 | if (m_syncLoop.isRunning()) { | 55 | if (m_syncLoop.isRunning()) { | ||
55 | qCWarning(KSCREEN_WAYLAND) << "Connection to Wayland server at socket:" | 56 | qCWarning(KSCREEN_WAYLAND) << "Connection to Wayland server at socket:" | ||
56 | << m_connection->socketName() << "timed out."; | 57 | << m_connection->socketName() << "timed out."; | ||
57 | m_syncLoop.quit(); | 58 | m_syncLoop.quit(); | ||
58 | m_thread->quit(); | 59 | m_thread->quit(); | ||
59 | m_thread->wait(); | 60 | m_thread->wait(); | ||
60 | } | 61 | } | ||
61 | }); | 62 | }); | ||
62 | 63 | | |||
63 | initKWinTabletMode(); | | |||
64 | initConnection(); | 64 | initConnection(); | ||
65 | m_syncLoop.exec(); | 65 | m_syncLoop.exec(); | ||
66 | } | 66 | } | ||
67 | 67 | | |||
68 | WaylandConfig::~WaylandConfig() | 68 | WaylandConfig::~WaylandConfig() | ||
69 | { | 69 | { | ||
70 | m_thread->quit(); | 70 | m_thread->quit(); | ||
71 | m_thread->wait(); | 71 | m_thread->wait(); | ||
▲ Show 20 Lines • Show All 295 Lines • Show Last 20 Lines |