Fix theme switcher preload scrim race

This commit is contained in:
Ryan Hughes
2026-06-02 22:38:31 -04:00
parent d52b69c49b
commit e8a8fcf183
4 changed files with 27 additions and 1 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ Item {
Process {
id: themeSwitchProc
command: ["bash", "-lc", "theme=$(omarchy-theme-switcher); [[ -n $theme ]] && omarchy-theme-set \"$theme\""]
command: ["bash", "-lc", "theme=$(omarchy-theme-switcher); [[ -n $theme ]] && omarchy-theme-set \"$theme\" >/dev/null 2>&1 &"]
onExited: root.refreshBackground()
}
@@ -324,6 +324,12 @@ Item {
}
function preloadRows(nextImageRows, nextSelectedImage, nextShowLabels, nextFilterable) {
// Theme/background set hooks can warm selector rows after a picker was
// dismissed. Ignore those preloads while a user-visible request is open;
// otherwise the preload resets layoutSettled without revealing again,
// leaving only the fullscreen scrim.
if (opened || requestActive) return
requestSerial += 1
imageRows = nextImageRows
selectedImage = nextSelectedImage