[wayland] Break showing desktop from ShellClient::takeFocus
Logic similar to Client::takeFocus: if window is keep above or on screen display do not break. Also if window belongs to the same ClientConnection as a desktop window don't break.
This commit is contained in:
parent
4b8fabca40
commit
7e1e044948
1 changed files with 17 additions and 0 deletions
|
@ -420,6 +420,23 @@ const QKeySequence &ShellClient::shortcut() const
|
||||||
void ShellClient::takeFocus()
|
void ShellClient::takeFocus()
|
||||||
{
|
{
|
||||||
setActive(true);
|
setActive(true);
|
||||||
|
|
||||||
|
bool breakShowingDesktop = !keepAbove() && !isOnScreenDisplay();
|
||||||
|
if (breakShowingDesktop) {
|
||||||
|
// check that it doesn't belong to the desktop
|
||||||
|
const auto &clients = waylandServer()->clients();
|
||||||
|
for (auto c: clients) {
|
||||||
|
if (!belongsToSameApplication(c, false)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (c->isDesktop()) {
|
||||||
|
breakShowingDesktop = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (breakShowingDesktop)
|
||||||
|
workspace()->setShowingDesktop(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShellClient::updateWindowRules(Rules::Types selection)
|
void ShellClient::updateWindowRules(Rules::Types selection)
|
||||||
|
|
Loading…
Reference in a new issue