Commit 90688b11 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

desktopbackgrounditem: Prefer desktop window with size matching output

Conky monitor's floating popup is of type desktop, too, and when it
gets picked over Plasma's desktop window, visual artifacts can be
observed behind e.g. the overview effect.
parent 3934d1d0
Pipeline #215274 passed with stage
in 14 minutes and 55 seconds
......@@ -105,13 +105,20 @@ void DesktopBackgroundItem::updateWindow()
#endif
}
Window *clientCandidate = nullptr;
const auto clients = workspace()->allClientList();
for (Window *client : clients) {
if (client->isDesktop() && client->isOnOutput(m_output) && client->isOnDesktop(desktop) && client->isOnActivity(activity)) {
setClient(client);
break;
// In the unlikely event there are multiple desktop windows (e.g. conky's floating panel is of type "desktop")
// choose the one which matches the ouptut size, if possible.
if (!clientCandidate || client->size() == m_output->geometry().size()) {
clientCandidate = client;
}
}
}
setClient(clientCandidate);
}
} // namespace KWin
......
Supports Markdown
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