Commit 8b644fee authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Merge Service
Browse files

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

BUG: 453696
Tested-by: Merge Service <!2454>
Part-of: <!2454>
parent 38eef5e2
Pipeline #180320 canceled with stage
in 1 minute and 10 seconds
......@@ -64,8 +64,11 @@ bool X11Output::usesSoftwareCursor() const
void X11Output::setMode(const QSize &size, int refreshRate)
{
auto mode = QSharedPointer<OutputMode>::create(size, refreshRate);
setModesInternal({mode}, mode);
const auto current = currentMode();
if (!current || current->size() != size || current->refreshRate() != refreshRate) {
auto mode = QSharedPointer<OutputMode>::create(size, refreshRate);
setModesInternal({mode}, mode);
}
}
}
......@@ -220,6 +220,7 @@ void Output::setModesInternal(const QList<QSharedPointer<OutputMode>> &modes, co
}
if (m_currentMode != oldCurrentMode) {
Q_EMIT currentModeChanged();
Q_EMIT geometryChanged();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment