From 619a0d5737430f90970d850d225f9cd66054b67e Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Wed, 13 May 2026 14:46:00 -0400 Subject: [PATCH] Update GUI state in resetToDefaults suppressReload was eating the file-watch callback that would have called loadConfig and refreshed the draft from disk, so the GUI stayed on the pre-reset layout even though bar.json was already correct. Apply the reset payload directly to draft (and bump draftRevision) so section editors re-render in the same frame. --- default/quickshell/bar-settings/shell.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/default/quickshell/bar-settings/shell.qml b/default/quickshell/bar-settings/shell.qml index 66cd1734..6428f2a3 100644 --- a/default/quickshell/bar-settings/shell.qml +++ b/default/quickshell/bar-settings/shell.qml @@ -151,6 +151,10 @@ ShellRoot { fontFamily: String(source.fontFamily || "JetBrainsMono Nerd Font"), layout: normalizeLayout(source.layout || {}) } + // Update the GUI synchronously — the suppressed file-watch callback won't + // fire loadConfig, so the draft would otherwise stay stale. + draft = payload + draftRevision++ suppressReload = true userFile.setText(JSON.stringify(payload, null, 2) + "\n") }