From f2f6f6f8904d6823d78b83e9274f6de5ee320c76 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Wed, 20 May 2026 09:38:08 +0200 Subject: [PATCH] Stabilize nested preview startup Use a concrete wallpaper image in generated shell config. Disable KSycoca watches when preview opts out, and keep the convergent window connection target nullable. --- CMakeLists.txt | 2 +- containments/homescreens/folio/applicationlistmodel.cpp | 4 +++- kwin/scripts/convergentwindows/contents/ui/main.qml | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 610f367a..1f5349ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,7 +138,7 @@ include(CheckIncludeFiles) ecm_find_qmlmodule(org.kde.pipewire 0.1) -set(SHIFT_DEFAULT_WALLPAPER_URL "file://${KDE_INSTALL_FULL_WALLPAPERDIR}/SHIFT/") +set(SHIFT_DEFAULT_WALLPAPER_URL "file://${KDE_INSTALL_FULL_WALLPAPERDIR}/SHIFT/contents/images_dark/5120x2880.png") set(SHIFT_SHELL_PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/shell") file(REMOVE_RECURSE "${SHIFT_SHELL_PACKAGE_DIR}") file(COPY shell/ DESTINATION "${SHIFT_SHELL_PACKAGE_DIR}" PATTERN "layout.js.in" EXCLUDE) diff --git a/containments/homescreens/folio/applicationlistmodel.cpp b/containments/homescreens/folio/applicationlistmodel.cpp index cb901853..d1018e20 100644 --- a/containments/homescreens/folio/applicationlistmodel.cpp +++ b/containments/homescreens/folio/applicationlistmodel.cpp @@ -31,7 +31,9 @@ ApplicationListModel::ApplicationListModel(HomeScreen *parent) m_reloadAppsTimer->setInterval(100ms); connect(m_reloadAppsTimer, &QTimer::timeout, this, &ApplicationListModel::sycocaDbChanged); - connect(KSycoca::self(), &KSycoca::databaseChanged, m_reloadAppsTimer, static_cast(&QTimer::start)); + if (!qEnvironmentVariableIsSet("SHIFT_PREVIEW_DISABLE_SYCOCA_WATCH")) { + connect(KSycoca::self(), &KSycoca::databaseChanged, m_reloadAppsTimer, static_cast(&QTimer::start)); + } // initialize wayland window checking KWayland::Client::ConnectionThread *connection = KWayland::Client::ConnectionThread::fromApplication(this); diff --git a/kwin/scripts/convergentwindows/contents/ui/main.qml b/kwin/scripts/convergentwindows/contents/ui/main.qml index eadc6cb0..41a7fa38 100644 --- a/kwin/scripts/convergentwindows/contents/ui/main.qml +++ b/kwin/scripts/convergentwindows/contents/ui/main.qml @@ -9,7 +9,7 @@ import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings Loader { id: root - property var currentWindow + property var currentWindow: null // Windows awaiting geometry clamping after un-maximize in convergence // mode. Using an array so concurrent un-maximizes are not lost. @@ -97,7 +97,7 @@ Loader { } Connections { - target: currentWindow + target: root.currentWindow function onFullScreenChanged() { if (!currentWindow) {