static void disassociate_window (ShellWindowTracker *self, MetaWindow *window) { ShellApp *app; app = g_hash_table_lookup (self->window_to_app, window); if (!app) return; g_object_ref (app); g_hash_table_remove (self->window_to_app, window); _shell_app_remove_window (app, window); if (shell_app_get_n_windows (app) == 0) { const char *id = shell_app_get_id (app); g_hash_table_remove (self->running_apps, id); g_signal_emit (self, signals[APP_RUNNING_CHANGED], 0, app); } g_signal_emit (self, signals[TRACKED_WINDOWS_CHANGED], 0); g_object_unref (app); }
static void disassociate_window (ShellWindowTracker *self, MetaWindow *window) { ShellApp *app; app = g_hash_table_lookup (self->window_to_app, window); if (!app) return; g_object_ref (app); g_hash_table_remove (self->window_to_app, window); _shell_app_remove_window (app, window); g_signal_handlers_disconnect_by_func (window, G_CALLBACK(on_wm_class_changed), self); g_signal_emit (self, signals[TRACKED_WINDOWS_CHANGED], 0); g_object_unref (app); }