Drop Window::resourceMatch()

Its body is trivial and it's used only once so it can be inlined.
remotes/origin/work/nico/sticky-keys
Vlad Zahorodnii 3 years ago
parent 25f284e68c
commit ec31ab4980
  1. 5
      src/window.cpp
  2. 1
      src/window.h
  3. 2
      src/x11window.cpp

@ -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;

@ -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;

@ -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)) {

Loading…
Cancel
Save