From 2be53c1df27c9ea2c1122c1a5cc723547bd602b9 Mon Sep 17 00:00:00 2001 From: reionwong Date: Mon, 31 Aug 2026 13:10:52 -0400 Subject: [PATCH] Revert "fix(screen): avoid persisting dynamic virtual display modes" This reverts commit 0592601b249d3e3141bd2cb8d6ac212bb3415b5b. --- screen/qt5/screen.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/screen/qt5/screen.cpp b/screen/qt5/screen.cpp index a56e813..c0b29dc 100644 --- a/screen/qt5/screen.cpp +++ b/screen/qt5/screen.cpp @@ -70,15 +70,7 @@ static void saveDisplayConfiguration(const KScreen::ConfigPtr &config) settings.setValue(QStringLiteral("Scale"), output->scale()); settings.setValue(QStringLiteral("Rotation"), static_cast(output->rotation())); - // Virtual SPICE/QEMU modes follow the host window. Persisting the - // current mode would make the next Wayland session restore an old - // UTM size instead of accepting the host's current size. - if (isDynamicDisplay(output)) { - settings.remove(QStringLiteral("ModeId")); - settings.remove(QStringLiteral("ModeWidth")); - settings.remove(QStringLiteral("ModeHeight")); - settings.remove(QStringLiteral("ModeRefreshRate")); - } else if (const KScreen::ModePtr mode = output->currentMode()) { + if (const KScreen::ModePtr mode = output->currentMode()) { settings.setValue(QStringLiteral("ModeId"), mode->id()); settings.setValue(QStringLiteral("ModeWidth"), mode->size().width()); settings.setValue(QStringLiteral("ModeHeight"), mode->size().height());