workspace: don't touch output configs on Xorg
It sets some output properties that don't match what Xorg knows about the outputs, which may cause problems CCBUG: 477268
This commit is contained in:
parent
aabadcee6d
commit
b976c274fd
1 changed files with 13 additions and 11 deletions
|
@ -248,18 +248,20 @@ void Workspace::init()
|
|||
connect(this, &Workspace::windowRemoved, m_placementTracker.get(), &PlacementTracker::remove);
|
||||
m_placementTracker->init(getPlacementTrackerHash());
|
||||
|
||||
const auto applySensorChanges = [this]() {
|
||||
if (waylandServer()) {
|
||||
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());
|
||||
if (opt) {
|
||||
const auto &[config, order, type] = *opt;
|
||||
applyOutputConfiguration(config, order);
|
||||
}
|
||||
};
|
||||
connect(m_lidSwitchTracker.get(), &LidSwitchTracker::lidStateChanged, this, applySensorChanges);
|
||||
connect(m_orientationSensor.get(), &OrientationSensor::orientationChanged, this, applySensorChanges);
|
||||
connect(kwinApp()->tabletModeManager(), &TabletModeManager::tabletModeChanged, this, applySensorChanges);
|
||||
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());
|
||||
if (opt) {
|
||||
const auto &[config, order, type] = *opt;
|
||||
applyOutputConfiguration(config, order);
|
||||
}
|
||||
};
|
||||
connect(m_lidSwitchTracker.get(), &LidSwitchTracker::lidStateChanged, this, applySensorChanges);
|
||||
connect(m_orientationSensor.get(), &OrientationSensor::orientationChanged, this, applySensorChanges);
|
||||
connect(kwinApp()->tabletModeManager(), &TabletModeManager::tabletModeChanged, this, applySensorChanges);
|
||||
m_orientationSensor->setEnabled(m_outputConfigStore->isAutoRotateActive(kwinApp()->outputBackend()->outputs(), kwinApp()->tabletModeManager()->effectiveTabletMode()));
|
||||
}
|
||||
}
|
||||
|
||||
QString Workspace::getPlacementTrackerHash()
|
||||
|
|
Loading…
Reference in a new issue