quickshell: load wallpaper state synchronously

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-21 19:08:47 +01:00
parent e5a375668a
commit 4edadbd2c2

View file

@ -611,6 +611,15 @@ in
property string name: "${defaultWall}" property string name: "${defaultWall}"
} }
onLoadFailed: if (path !== "") writeAdapter() onLoadFailed: if (path !== "") writeAdapter()
// blockLoading alone does NOT make this synchronous:
// preload already started an async read when path was
// set, and a JsonAdapter only waits for dataChanged — it
// never calls text(), the one read blockLoading gates.
// Without this, shell.qml's startup applyTheme() saw the
// default wallpaper, then the real one a moment later,
// and two concurrent theme-apply runs raced for the
// Hyprland borders. text() here joins the in-flight read.
Component.onCompleted: text()
} }
// Unknown name (wallpaper deleted from the repo since it was // Unknown name (wallpaper deleted from the repo since it was