From 4fbd238a908ab4b37f22023cbf731d2e91b6f5a6 Mon Sep 17 00:00:00 2001 From: Akash <145587932+Itsmeakash248@users.noreply.github.com> Date: Sun, 1 Feb 2026 10:54:40 +0530 Subject: [PATCH] fix(dock): add robust retry mechanism for desktop entry lookup Resolves an issue where dock buttons would fail to function on startup if the system's application database wasn't fully loaded. Adds a self-healing timer to DockAppButton. --- .../quickshell/ii/modules/ii/dock/DockAppButton.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/ii/dock/DockAppButton.qml b/dots/.config/quickshell/ii/modules/ii/dock/DockAppButton.qml index 8d2d270ae..297d363af 100644 --- a/dots/.config/quickshell/ii/modules/ii/dock/DockAppButton.qml +++ b/dots/.config/quickshell/ii/modules/ii/dock/DockAppButton.qml @@ -18,7 +18,18 @@ DockButton { property bool appIsActive: appToplevel.toplevels.find(t => (t.activated == true)) !== undefined readonly property bool isSeparator: appToplevel.appId === "SEPARATOR" - readonly property var desktopEntry: DesktopEntries.heuristicLookup(appToplevel.appId) + property var desktopEntry: DesktopEntries.heuristicLookup(appToplevel.appId) + + Timer { + // Retry looking up the desktop entry if it failed (e.g. database not loaded yet) + interval: 500 + running: !root.isSeparator && root.desktopEntry === null + repeat: true + onTriggered: { + root.desktopEntry = DesktopEntries.heuristicLookup(root.appToplevel.appId); + } + } + enabled: !isSeparator implicitWidth: isSeparator ? 1 : implicitHeight - topInset - bottomInset