Set pid on the PlasmaWindow based on the client connection.

Summary: Depends on D5747.

Test Plan:

Reviewers: #plasma,sebas,graesslin

Subscribers: plasma-devel
icc-effect-5.14.5
Eike Hein 2017-05-08 09:44:52 +09:00
parent 55933d9cc9
commit 262fb00b51
4 changed files with 16 additions and 1 deletions

View File

@ -704,6 +704,7 @@ void AbstractClient::setupWindowManagementInterface()
};
updateAppId();
w->setSkipTaskbar(skipTaskbar());
w->setPid(pid());
w->setShadeable(isShadeable());
w->setShaded(isShade());
w->setResizable(isResizable());

View File

@ -981,6 +981,11 @@ void ShellClient::updateInternalWindowGeometry()
m_internalWindow->geometry().size() + QSize(borderLeft() + borderRight(), borderTop() + borderBottom())));
}
pid_t ShellClient::pid() const
{
return surface()->client()->processId();
}
bool ShellClient::isInternal() const
{
return m_internal;

View File

@ -108,6 +108,15 @@ public:
quint32 windowId() const override {
return m_windowId;
}
/**
* The process for this client.
* Note that processes started by kwin will share its process id.
* @since 5.11
* @returns the process if for this client.
**/
pid_t pid() const override;
bool isInternal() const;
bool isLockScreen() const override;
bool isInputMethod() const override;

View File

@ -289,7 +289,7 @@ public:
QByteArray wmClientMachine(bool use_localhost) const;
const ClientMachine *clientMachine() const;
Window wmClientLeader() const;
pid_t pid() const;
virtual pid_t pid() const;
static bool resourceMatch(const Toplevel* c1, const Toplevel* c2);
bool readyForPainting() const; // true if the window has been already painted its contents