mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
shell-app: Ignore invalid window PIDs
When building the list of window PIDs, it's possible Mutter doesn't know about the PID the client has and meta_window_get_pid() will return 0. We should handle this case by not adding the PID to the list of PIDs instead of adding an invalid one to it. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1184
This commit is contained in:
parent
4aee87a31b
commit
d4db5a59c1
1 changed files with 4 additions and 0 deletions
|
|
@ -1159,6 +1159,10 @@ shell_app_get_pids (ShellApp *app)
|
|||
{
|
||||
MetaWindow *window = iter->data;
|
||||
int pid = meta_window_get_pid (window);
|
||||
|
||||
if (pid < 1)
|
||||
continue;
|
||||
|
||||
/* Note in the (by far) common case, app will only have one pid, so
|
||||
* we'll hit the first element, so don't worry about O(N^2) here.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue