Integrate complete display layouts

This commit is contained in:
Gabriel Brown
2026-08-18 15:00:18 -04:00
parent 0c3935f818
commit d2898d8806
10 changed files with 220 additions and 31 deletions
+9 -2
View File
@@ -365,8 +365,8 @@ Singleton {
// Applies immediately and starts the countdown. Nothing is stored yet: the
// complete connected layout is only written by confirm().
function applyLayout(layout: var): bool {
if (root.externalChangeBlocked) {
function applyLayout(layout: var, protectedOperation: bool): bool {
if (root.externalChangeBlocked && protectedOperation !== true) {
root.lastError = "Wait for Settings to finish restoring before changing a display.";
return false;
}
@@ -397,6 +397,13 @@ Singleton {
return true;
}
// Settings restore holds the external-change lock while it proves a
// snapshot. This narrow entry point authorizes that one transaction while
// keeping every user-facing control blocked until restore settles.
function applyProtectedLayout(layout: var): bool {
return root.applyLayout(layout, true);
}
function makePrimary(output: string): bool {
const layout = root.currentLayout();
if (!layout.some(record => record.name === output)) {