https://bugs.kde.org/show_bug.cgi?id=356161

Anton <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
                 CC|                            |[email protected]
             Status|RESOLVED                    |REOPENED

--- Comment #12 from Anton <[email protected]> ---
(In reply to Thomas Lübking from comment #11)
> 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.

Sorry for my english.

Current code does not fulfill these duties. Try next case: run minimizeall on
some windows, then click on one of windows, then run minimizeall again. All
windows would be unminimized!

I have tried to make small changes to original code of main.js, but i can't
because i don't understand it.

Thats why i wrote my own version.

Sorry for my english again.

var minimizeAllWindows = function() {
    var allClients = workspace.clientList();
    var clients = [];
    var minimize = false;
    for (var i = 0; i < allClients.length; ++i) {
        if (isRelevant(allClients[i])) {
            clients.push(allClients[i]);
            if (!allClients[i].minimized) {
                minimize = true;
            }
        }
    }
    if (minimize == true) {
        for (var i = 0; i < clients.length; ++i) {
            delete clients[i].minimizedForMinimizeAll;
            if (clients[i].minimized == true) {
                continue;
            }
            else {
                clients[i].minimized = true;
                clients[i].minimizedForMinimizeAll = true;
            }
       }
    }
    else {
        for (var i = 0; i < clients.length; ++i) {
            if (clients[i].minimizedForMinimizeAll == true) {
                clients[i].minimized = false;
            }
        }

    }
    clients = [];
}

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to