Drop Window::resourceMatch()

Its body is trivial and it's used only once so it can be inlined.
This commit is contained in:
Vlad Zahorodnii 2023-03-29 15:35:05 +03:00
parent 25f284e68c
commit ec31ab4980
3 changed files with 1 additions and 7 deletions

View file

@ -193,11 +193,6 @@ void Window::setResourceClass(const QString &name, const QString &className)
Q_EMIT windowClassChanged();
}
bool Window::resourceMatch(const Window *c1, const Window *c2)
{
return c1->resourceClass() == c2->resourceClass();
}
qreal Window::opacity() const
{
return m_opacity;

View file

@ -666,7 +666,6 @@ public:
ClientMachine *clientMachine() const;
virtual bool isLocalhost() const;
virtual pid_t pid() const;
static bool resourceMatch(const Window *c1, const Window *c2);
bool readyForPainting() const; // true if the window has been already painted its contents
QRegion inputShape() const;

View file

@ -3090,7 +3090,7 @@ bool X11Window::belongToSameApplication(const X11Window *c1, const X11Window *c2
&& c2->wmClientLeader() != c2->window() // don't use in this test then
&& !checks.testFlag(SameApplicationCheck::AllowCrossProcesses)) {
; // different client leader
} else if (!resourceMatch(c1, c2)) {
} else if (c1->resourceClass() != c2->resourceClass()) {
; // different apps
} else if (!sameAppWindowRoleMatch(c1, c2, checks.testFlag(SameApplicationCheck::RelaxedForActive))
&& !checks.testFlag(SameApplicationCheck::AllowCrossProcesses)) {