[gnome-shell/wip/sass] window-tracker: Fix pid based window/app association
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/sass] window-tracker: Fix pid based window/app association
- Date: Thu, 8 Jan 2015 10:08:42 +0000 (UTC)
commit 7cdeb4e26e86fe91c11048741e7884bd7bc7a4f8
Author: Sebastian Keller <sebastian-keller gmx de>
Date: Mon Dec 8 19:53:39 2014 +0100
window-tracker: Fix pid based window/app association
The lookup table used by get_app_from_window_pid contained only pids of
apps launched by gnome-shell itself, but not pids of apps running before
gnome-shell was (re-)started. Also the pids in that table might not even
be the pid of the process that is actually showing the window if wrapper
scripts are used.
Instead use shell_window_tracker_get_app_from_pid which uses the pids
from the windows themselves.
This removes the only use of launched_pid_to_app which will be removed
in the following commit.
This fixes: https://bugzilla.gnome.org/show_bug.cgi?id=736527
src/shell-window-tracker.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
index 5c49008..deef1b4 100644
--- a/src/shell-window-tracker.c
+++ b/src/shell-window-tracker.c
@@ -293,7 +293,7 @@ get_app_from_window_group (ShellWindowTracker *tracker,
* @window: a #MetaWindow
*
* Check if the pid associated with @window corresponds to an
- * application we launched.
+ * application.
*
* Return value: (transfer full): A newly-referenced #ShellApp, or %NULL
*/
@@ -312,7 +312,7 @@ get_app_from_window_pid (ShellWindowTracker *tracker,
if (pid == -1)
return NULL;
- result = g_hash_table_lookup (tracker->launched_pid_to_app, GINT_TO_POINTER (pid));
+ result = shell_window_tracker_get_app_from_pid (tracker, pid);
if (result != NULL)
g_object_ref (result);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]