From 4aee87a31b1f73ef6f5a7f3928e54d336bc37f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Mon, 6 Apr 2020 20:28:00 +0200 Subject: [PATCH] shell-window-tracker: Detect invalid PID values of 0 MetaWindows get_pid() API changed to use the client PID, which also works for Wayland clients instead of only X11 clients now. This API returns 0 instead of -1 for invalid PIDs, so update our check according to that. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1184 --- src/shell-window-tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c index 075cb2a16..99ed8270c 100644 --- a/src/shell-window-tracker.c +++ b/src/shell-window-tracker.c @@ -343,7 +343,7 @@ get_app_from_window_pid (ShellWindowTracker *tracker, pid = meta_window_get_pid (window); - if (pid == -1) + if (pid < 1) return NULL; result = shell_window_tracker_get_app_from_pid (tracker, pid);