Commit cc862fa6 authored by Nate Graham's avatar Nate Graham
Browse files

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

Right now KWin moves minimized windows to the end of the task switcher's
ordering. However this is a rather confusing and undocumented behavior
that explicitly overrides the user's chosen sort ordering, be it
"Recently used" or "Stacking order". This makes it a hidden magic behavior
of the type that is at risk of being more annoying than useful.

This commit removes the special handling and lets minimized windows live
in the appropriate order in the task switcher.
parent 159fbc5e
......@@ -711,7 +711,6 @@ 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);
......
......@@ -238,17 +238,7 @@ AbstractClient *FocusChain::nextForDesktop(AbstractClient *reference, uint deskt
void FocusChain::makeFirstInChain(AbstractClient *client, Chain &chain)
{
chain.removeAll(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);
}
chain.append(client);
}
void FocusChain::makeLastInChain(AbstractClient *client, Chain &chain)
......
......@@ -52,8 +52,7 @@ public:
enum Change {
MakeFirst,
MakeLast,
Update,
MakeFirstMinimized = MakeFirst
Update
};
~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