From 6543ab3caaf1593bee23c1e211bc8419bba00d93 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Wed, 12 Jun 2024 17:35:57 +0200 Subject: [PATCH] workspace: only load output configs on Wayland They don't need to be loaded, or on exit saved again on X11 BUG: 488229 --- src/workspace.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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());