emphasize minimization in m. all script
As long as there's something to minimize, do that. Otherwise unminimize only the windows we minimized on last invocation. BUG: 356161 FIXED-IN: 5.6 REVIEW: 126225
This commit is contained in:
parent
7b8ccd760d
commit
8885a6798a
1 changed files with 7 additions and 4 deletions
|
@ -27,18 +27,21 @@ function isRelevant(client) {
|
|||
var minimizeAllWindows = function() {
|
||||
var allClients = workspace.clientList();
|
||||
var clients = [];
|
||||
var minimize = true;
|
||||
var minimize = false;
|
||||
for (var i = 0; i < allClients.length; ++i) {
|
||||
if (isRelevant(allClients[i])) {
|
||||
clients.push(allClients[i]);
|
||||
if (allClients[i].minimizedForMinimizeAll === true) {
|
||||
minimize = false;
|
||||
if (!allClients[i].minimized && allClients[i].minimizedForMinimizeAll !== true) {
|
||||
minimize = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < clients.length; ++i) {
|
||||
if (minimize && clients[i].minimized)
|
||||
if ((minimize == clients[i].minimized) || // no change required at all
|
||||
(!minimize && clients[i].minimizedForMinimizeAll !== true)) { // unminimize, but not this one
|
||||
delete clients[i].minimizedForMinimizeAll;
|
||||
continue;
|
||||
}
|
||||
clients[i].minimized = minimize;
|
||||
clients[i].minimizedForMinimizeAll = minimize;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue