MinimizeAll - Restore Focus
MinimizeAll Restored focus upon undo minimize-all windows
for (var i = 0; i < relevantClients.length; ++i) {
var wasMinimizedByScript = relevantClients[i].minimizedByScript;
delete relevantClients[i].minimizedByScript;
var wasActiveWindow = relevantClients[i].isActiveWindow;
delete relevantClients[i].isActiveWindow;
if (minimize) {
if (relevantClients[i].minimized) {
continue;
}
relevantClients[i].isActiveWindow = Boolean(relevantClients[i].active);
relevantClients[i].minimized = true;
relevantClients[i].minimizedByScript = true;
} else {
if (!wasMinimizedByScript) {
continue;
}
relevantClients[i].minimized = false;
if (wasActiveWindow) {
workspace.activeClient = relevantClients[i];
}
}
}
The previous attempt (22b7ac02) to create this feature is unstable.
Edited by ivan tkachenko