[gnome-shell] shell-window-tracker: Detect invalid PID values of 0
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] shell-window-tracker: Detect invalid PID values of 0
- Date: Mon, 6 Apr 2020 22:03:29 +0000 (UTC)
commit 4aee87a31b1f73ef6f5a7f3928e54d336bc37f02
Author: Jonas Dreßler <verdre v0yd nl>
Date: Mon Apr 6 20:28:00 2020 +0200
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 075cb2a164..99ed8270c0 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]