[gnome-shell] window-tracker: remove now unused launched_pid_to_app
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] window-tracker: remove now unused launched_pid_to_app
- Date: Mon, 29 Dec 2014 01:13:57 +0000 (UTC)
commit 01c6392c1373cf23786a0dad1b670a511107349c
Author: Sebastian Keller <sebastian-keller gmx de>
Date: Mon Dec 8 20:12:03 2014 +0100
window-tracker: remove now unused launched_pid_to_app
https://bugzilla.gnome.org/show_bug.cgi?id=736527
src/shell-app.c | 22 ++--------------------
src/shell-window-tracker.c | 40 ----------------------------------------
2 files changed, 2 insertions(+), 60 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index f9ddd2b..2436239 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -1300,24 +1300,6 @@ shell_app_request_quit (ShellApp *app)
return TRUE;
}
-static void
-_gather_pid_callback (GDesktopAppInfo *gapp,
- GPid pid,
- gpointer data)
-{
- ShellApp *app;
- ShellWindowTracker *tracker;
-
- g_return_if_fail (data != NULL);
-
- app = SHELL_APP (data);
- tracker = shell_window_tracker_get_default ();
-
- _shell_window_tracker_add_child_process_app (tracker,
- pid,
- app);
-}
-
#ifdef HAVE_SYSTEMD
/* This sets up the launched application to log to the journal
* using its own identifier, instead of just "gnome-session".
@@ -1369,13 +1351,13 @@ shell_app_launch (ShellApp *app,
ret = g_desktop_app_info_launch_uris_as_manager (app->info, NULL,
context,
- G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
+ G_SPAWN_SEARCH_PATH,
#ifdef HAVE_SYSTEMD
app_child_setup, (gpointer)shell_app_get_id (app),
#else
NULL, NULL,
#endif
- _gather_pid_callback, app,
+ NULL, NULL,
error);
g_object_unref (context);
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
index deef1b4..a4d804d 100644
--- a/src/shell-window-tracker.c
+++ b/src/shell-window-tracker.c
@@ -47,9 +47,6 @@ struct _ShellWindowTracker
/* <MetaWindow * window, ShellApp *app> */
GHashTable *window_to_app;
-
- /* <int, ShellApp *app> */
- GHashTable *launched_pid_to_app;
};
G_DEFINE_TYPE (ShellWindowTracker, shell_window_tracker, G_TYPE_OBJECT);
@@ -631,8 +628,6 @@ shell_window_tracker_init (ShellWindowTracker *self)
self->window_to_app = g_hash_table_new_full (g_direct_hash, g_direct_equal,
NULL, (GDestroyNotify) g_object_unref);
- self->launched_pid_to_app = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) g_object_unref);
-
screen = shell_global_get_screen (shell_global_get ());
g_signal_connect (G_OBJECT (screen), "startup-sequence-changed",
@@ -648,7 +643,6 @@ shell_window_tracker_finalize (GObject *object)
ShellWindowTracker *self = SHELL_WINDOW_TRACKER (object);
g_hash_table_destroy (self->window_to_app);
- g_hash_table_destroy (self->launched_pid_to_app);
G_OBJECT_CLASS (shell_window_tracker_parent_class)->finalize(object);
}
@@ -718,40 +712,6 @@ shell_window_tracker_get_app_from_pid (ShellWindowTracker *tracker,
}
static void
-on_child_exited (GPid pid,
- gint status,
- gpointer unused_data)
-{
- ShellWindowTracker *tracker;
-
- tracker = shell_window_tracker_get_default ();
-
- g_hash_table_remove (tracker->launched_pid_to_app, GINT_TO_POINTER((gint)pid));
-}
-
-void
-_shell_window_tracker_add_child_process_app (ShellWindowTracker *tracker,
- GPid pid,
- ShellApp *app)
-{
- gpointer pid_ptr = GINT_TO_POINTER((int)pid);
-
- if (g_hash_table_lookup (tracker->launched_pid_to_app,
- &pid_ptr))
- return;
-
- g_hash_table_insert (tracker->launched_pid_to_app,
- pid_ptr,
- g_object_ref (app));
- g_child_watch_add (pid, on_child_exited, NULL);
- /* TODO: rescan unassociated windows
- * Unlikely in practice that the launched app gets ahead of us
- * enough to map an X window before we get scheduled after the fork(),
- * but adding this note for future reference.
- */
-}
-
-static void
set_focus_app (ShellWindowTracker *tracker,
ShellApp *new_focus_app)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]