[gnome-shell] shell/app: Only release window ref when we are done
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] shell/app: Only release window ref when we are done
- Date: Sun, 14 Mar 2021 20:41:08 +0000 (UTC)
commit 0cf22f4a1b172763c7c98e86ff3f4064305bba40
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Mar 14 00:10:56 2021 +0100
shell/app: Only release window ref when we are done
We hold a reference to all windows we track for the app. While that
reference is unlikely to be the last remaining one, we still shouldn't
release it until we are done with the window.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1761>
src/shell-app.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index 17b179cbab..d4fe30b0f5 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -1115,13 +1115,14 @@ _shell_app_remove_window (ShellApp *app,
g_signal_handlers_disconnect_by_func (window, G_CALLBACK(shell_app_on_unmanaged), app);
g_signal_handlers_disconnect_by_func (window, G_CALLBACK(shell_app_on_user_time_changed), app);
g_signal_handlers_disconnect_by_func (window, G_CALLBACK(shell_app_on_skip_taskbar_changed), app);
- g_object_unref (window);
app->running_state->windows = g_slist_remove (app->running_state->windows, window);
if (!meta_window_is_skip_taskbar (window))
app->running_state->interesting_windows--;
shell_app_sync_running_state (app);
+ g_object_unref (window);
+
if (app->running_state->windows == NULL)
g_clear_pointer (&app->running_state, unref_running_state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]