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:
parent
38eef5e2b7
commit
8b644fee58
2 changed files with 6 additions and 2 deletions
|
@ -64,8 +64,11 @@ bool X11Output::usesSoftwareCursor() const
|
||||||
|
|
||||||
void X11Output::setMode(const QSize &size, int refreshRate)
|
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);
|
auto mode = QSharedPointer<OutputMode>::create(size, refreshRate);
|
||||||
setModesInternal({mode}, mode);
|
setModesInternal({mode}, mode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,6 +220,7 @@ void Output::setModesInternal(const QList<QSharedPointer<OutputMode>> &modes, co
|
||||||
}
|
}
|
||||||
if (m_currentMode != oldCurrentMode) {
|
if (m_currentMode != oldCurrentMode) {
|
||||||
Q_EMIT currentModeChanged();
|
Q_EMIT currentModeChanged();
|
||||||
|
Q_EMIT geometryChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue