Implement transientFor in ShellClient
This commit is contained in:
parent
c4c3dfc73f
commit
0935a60b38
2 changed files with 17 additions and 0 deletions
|
@ -101,6 +101,9 @@ ShellClient::ShellClient(ShellSurfaceInterface *surface)
|
||||||
setResourceClass(m_shellSurface->windowClass());
|
setResourceClass(m_shellSurface->windowClass());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
setTransient();
|
||||||
|
connect(surface, &ShellSurfaceInterface::transientForChanged, this, &ShellClient::setTransient);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShellClient::~ShellClient() = default;
|
ShellClient::~ShellClient() = default;
|
||||||
|
@ -712,4 +715,15 @@ void ShellClient::updateIcon()
|
||||||
setIcon(QIcon::fromTheme(df.readIcon()));
|
setIcon(QIcon::fromTheme(df.readIcon()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ShellClient::isTransient() const
|
||||||
|
{
|
||||||
|
return m_shellSurface->isTransient();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShellClient::setTransient()
|
||||||
|
{
|
||||||
|
const auto s = m_shellSurface->transientFor();
|
||||||
|
setTransientFor(waylandServer()->findClient(s.data()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,8 @@ public:
|
||||||
|
|
||||||
bool isInitialPositionSet() const;
|
bool isInitialPositionSet() const;
|
||||||
|
|
||||||
|
bool isTransient() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void addDamage(const QRegion &damage) override;
|
void addDamage(const QRegion &damage) override;
|
||||||
bool belongsToSameApplication(const AbstractClient *other, bool active_hack) const override;
|
bool belongsToSameApplication(const AbstractClient *other, bool active_hack) const override;
|
||||||
|
@ -129,6 +131,7 @@ private:
|
||||||
void updateInternalWindowGeometry();
|
void updateInternalWindowGeometry();
|
||||||
void updateIcon();
|
void updateIcon();
|
||||||
void markAsMapped();
|
void markAsMapped();
|
||||||
|
void setTransient();
|
||||||
static void deleteClient(ShellClient *c);
|
static void deleteClient(ShellClient *c);
|
||||||
|
|
||||||
KWayland::Server::ShellSurfaceInterface *m_shellSurface;
|
KWayland::Server::ShellSurfaceInterface *m_shellSurface;
|
||||||
|
|
Loading…
Reference in a new issue