[tabbox] Properly check whether two windows belong to same application

Summary:
TabBox implemented a custom way to check whether two windows belong to
the same application. KWin internally has API for that which does it
better, in a standardized way and even across windowing system.

This change uses the internal API, resulting in the check working better
on X11 and starts to work on Wayland.

Test Plan: Verified Alt+` with Wayland windows

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7713
icc-effect-5.14.5
Martin Flöser 2017-09-06 21:04:31 +02:00
parent e0f95fd913
commit 5d9027b110
1 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ bool TabBoxHandlerImpl::checkApplications(TabBoxClient* client) const
continue;
}
if ((c = dynamic_cast< TabBoxClientImpl* >(client.data()))) {
if (c->client()->resourceClass() == current->resourceClass()) {
if (AbstractClient::belongToSameApplication(c->client(), current)) {
return false;
}
}
@ -212,7 +212,7 @@ bool TabBoxHandlerImpl::checkApplications(TabBoxClient* client) const
return false;
}
if ((c = dynamic_cast< TabBoxClientImpl* >(pointer.data()))) {
if (c->client()->resourceClass() == current->resourceClass()) {
if (AbstractClient::belongToSameApplication(c->client(), current)) {
return true;
}
}