backends/x11: Ensure that Output::geometryChanged is emitted when modes change

BUG: 453696
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2454>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2454>
This commit is contained in:
Vlad Zahorodnii 2022-05-24 10:45:15 +03:00 committed by Merge Service
parent 38eef5e2b7
commit 8b644fee58
2 changed files with 6 additions and 2 deletions

View file

@ -64,8 +64,11 @@ bool X11Output::usesSoftwareCursor() const
void X11Output::setMode(const QSize &size, int refreshRate)
{
const auto current = currentMode();
if (!current || current->size() != size || current->refreshRate() != refreshRate) {
auto mode = QSharedPointer<OutputMode>::create(size, refreshRate);
setModesInternal({mode}, mode);
}
}
}

View file

@ -220,6 +220,7 @@ void Output::setModesInternal(const QList<QSharedPointer<OutputMode>> &modes, co
}
if (m_currentMode != oldCurrentMode) {
Q_EMIT currentModeChanged();
Q_EMIT geometryChanged();
}
}