diff --git a/src/workspace.cpp b/src/workspace.cpp index 034a66ac41..2b4d2ed8bf 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -114,7 +114,6 @@ Workspace::Workspace() , m_focusChain(std::make_unique()) , m_applicationMenu(std::make_unique()) , m_placementTracker(std::make_unique(this)) - , m_outputConfigStore(std::make_unique()) , m_lidSwitchTracker(std::make_unique()) , m_orientationSensor(std::make_unique()) { @@ -247,6 +246,8 @@ void Workspace::init() m_placementTracker->init(getPlacementTrackerHash()); if (waylandServer()) { + m_outputConfigStore = std::make_unique(); + const auto applySensorChanges = [this]() { m_orientationSensor->setEnabled(m_outputConfigStore->isAutoRotateActive(kwinApp()->outputBackend()->outputs(), kwinApp()->tabletModeManager()->effectiveTabletMode())); const auto opt = m_outputConfigStore->queryConfig(kwinApp()->outputBackend()->outputs(), m_lidSwitchTracker->isLidClosed(), m_orientationSensor->reading(), kwinApp()->tabletModeManager()->effectiveTabletMode());