kwin: kill via SIGKILL just in case XKillClient() does not get the job done

only for clients on the local machine tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-05-17 05:48:52 +03:00
parent 9d5db89a12
commit 25c25215a4

View file

@ -1262,6 +1262,16 @@ void Client::closeWindow()
void Client::killWindow()
{
kDebug(1212) << "Client::killWindow():" << caption();
if (clientMachine()->isLocal()) {
pid_t pid = info->pid();
if (pid > 0) {
if (::kill(pid, SIGKILL) == -1) {
kWarning(1212) << "kill failed";
} else {
kDebug(1212) << "killed client via SIGKILL";
}
}
}
XKillClient(display(), window()); // Always kill this client at the server
destroyClient();
}