diff --git a/config/dot/quickshell/settings-system-harness.qml b/config/dot/quickshell/settings-system-harness.qml index 7c59615..6c563ae 100644 --- a/config/dot/quickshell/settings-system-harness.qml +++ b/config/dot/quickshell/settings-system-harness.qml @@ -23,14 +23,16 @@ ShellRoot { // Production applyOptions is covered separately by the Hyprland write // contract; this seam proves commit/reset routing without changing the // desktop that is running the test. - SystemSettings.compositorApplyOverride = function(requested) { - const batches = root.appliedBatches.slice(); - batches.push(requested); - root.appliedBatches = batches; - for (const key in requested) - DesktopPreferences.set(key, requested[key]); - return true; - }; + if (Quickshell.env("PANAMA_SETTINGS_TEST_ISOLATE_COMPOSITOR") === "1") { + SystemSettings.compositorApplyOverride = function(requested) { + const batches = root.appliedBatches.slice(); + batches.push(requested); + root.appliedBatches = batches; + for (const key in requested) + DesktopPreferences.set(key, requested[key]); + return true; + }; + } SystemSettings.displayBusy = function() { return false; }; SystemSettings.readDisplays = function() { return DesktopPreferences.get("displays"); }; SystemSettings.protectDisplays = function(value) { diff --git a/tests/quickshell/settings-commit-reset-contract.sh b/tests/quickshell/settings-commit-reset-contract.sh index 41fdbb8..a1e4352 100755 --- a/tests/quickshell/settings-commit-reset-contract.sh +++ b/tests/quickshell/settings-commit-reset-contract.sh @@ -51,7 +51,8 @@ rg -Fq 'property string storedValue:' "$wallpaper_service" \ || fail 'the shipped wallpaper cannot remain represented by the default empty preference' qs_for_harness() { - XDG_CONFIG_HOME="$config_home" XDG_STATE_HOME="$state_home" qs -p "$harness" "$@" + XDG_CONFIG_HOME="$config_home" XDG_STATE_HOME="$state_home" \ + PANAMA_SETTINGS_TEST_ISOLATE_COMPOSITOR=1 qs -p "$harness" "$@" } restore() { @@ -60,7 +61,8 @@ restore() { } trap restore EXIT -XDG_CONFIG_HOME="$config_home" XDG_STATE_HOME="$state_home" qs -p "$harness" --daemonize >/dev/null +XDG_CONFIG_HOME="$config_home" XDG_STATE_HOME="$state_home" \ + PANAMA_SETTINGS_TEST_ISOLATE_COMPOSITOR=1 qs -p "$harness" --daemonize >/dev/null for _ in $(seq 1 40); do qs_for_harness ipc show 2>/dev/null | rg -q '^target settings-system-test$' && break sleep 0.1