From 5d9027b110be7510a75daa789402b83c106a4164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Wed, 6 Sep 2017 21:04:31 +0200 Subject: [PATCH] [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 --- tabbox/tabbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index ce825bd3fd..2df33463f0 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -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; } }