Commit 75fded6f authored by Nate Graham's avatar Nate Graham 🔩

Revert "[focuschain/task switcher] Remove special handling for minimized windows"

This reverts commit cc862fa6.

It turns out that some people like this behavior and we've received
various user complaints about it.
parent 54919a16
......@@ -703,6 +703,7 @@ void AbstractClient::minimize(bool avoid_animation)
doMinimize();
updateWindowRules(Rules::Minimize);
FocusChain::self()->update(this, FocusChain::MakeFirstMinimized);
// TODO: merge signal with s_minimized
addWorkspaceRepaint(visibleRect());
emit clientMinimized(this, !avoid_animation);
......
......@@ -227,7 +227,17 @@ AbstractClient *FocusChain::nextForDesktop(AbstractClient *reference, uint deskt
void FocusChain::makeFirstInChain(AbstractClient *client, Chain &chain)
{
chain.removeAll(client);
chain.append(client);
if (client->isMinimized()) { // add it before the first minimized ...
for (int i = chain.count()-1; i >= 0; --i) {
if (chain.at(i)->isMinimized()) {
chain.insert(i+1, client);
return;
}
}
chain.prepend(client); // ... or at end of chain
} else {
chain.append(client);
}
}
void FocusChain::makeLastInChain(AbstractClient *client, Chain &chain)
......
......@@ -41,7 +41,8 @@ public:
enum Change {
MakeFirst,
MakeLast,
Update
Update,
MakeFirstMinimized = MakeFirst
};
~FocusChain() override;
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment