Integrate complete display layouts
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user