[metacity] delete: use meta_window_get_client_pid
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] delete: use meta_window_get_client_pid
- Date: Sat, 12 Sep 2020 12:19:04 +0000 (UTC)
commit c5136ec907fab167ffddfe4d10c3902c6c5d8852
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Sep 12 14:20:42 2020 +0300
delete: use meta_window_get_client_pid
src/core/delete.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/core/delete.c b/src/core/delete.c
index df489af4..415c39ce 100644
--- a/src/core/delete.c
+++ b/src/core/delete.c
@@ -149,14 +149,17 @@ meta_window_delete (MetaWindow *window,
void
meta_window_kill (MetaWindow *window)
{
+ pid_t client_pid;
char buf[257];
meta_topic (META_DEBUG_WINDOW_OPS,
"Killing %s brutally\n",
window->desc);
+ client_pid = meta_window_get_client_pid (window);
+
if (window->wm_client_machine != NULL &&
- window->net_wm_pid > 0)
+ client_pid > 0)
{
if (gethostname (buf, sizeof(buf)-1) == 0)
{
@@ -166,7 +169,7 @@ meta_window_kill (MetaWindow *window)
"Killing %s with kill()\n",
window->desc);
- if (kill (window->net_wm_pid, 9) < 0)
+ if (kill (client_pid, 9) < 0)
meta_topic (META_DEBUG_WINDOW_OPS,
"Failed to signal %s: %s\n",
window->desc, strerror (errno));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]