diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2023-05-01 17:04:46 +0200 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2023-05-03 14:00:33 +0000 |
commit | 356bab112154743e69ad3fcbcd9029dc532b262e (patch) | |
tree | ffe071bd09c16bbf05045d9a50685a2d35d01292 | |
parent | b6ab9091805e87c26178f5d09dadf6ee83be0f0d (diff) | |
download | gnome-shell-356bab112154743e69ad3fcbcd9029dc532b262e.tar.gz |
shell: Use swapped signal connection for MetaWindowActor::destroy
The callback would schedule a clutter_actor_destroy() on the first
argument. Unless told otherwise, this is the same actor that is
already being destroyed, so this is a no-op.
Instead, the intent is to make the clone follow up destruction of
the window actor so that it results in correct removal of this
window from the ShellWindowPreviewLayout. Use a swapped connection
to pass the clone actor as the first argument of the signal callback.
Fixes: 04c781674c ("Move WindowPreviewLayout from JS to C")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6570
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2756>
-rw-r--r-- | src/shell-window-preview-layout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell-window-preview-layout.c b/src/shell-window-preview-layout.c index 8d8596af4..fa3cc1f6d 100644 --- a/src/shell-window-preview-layout.c +++ b/src/shell-window-preview-layout.c @@ -394,8 +394,8 @@ shell_window_preview_layout_add_window (ShellWindowPreviewLayout *self, g_signal_connect (window, "position-changed", G_CALLBACK (on_window_size_position_changed), self); window_info->window_actor_destroy_id = - g_signal_connect (window_actor, "destroy", - G_CALLBACK (on_window_destroyed), actor); + g_signal_connect_swapped (window_actor, "destroy", + G_CALLBACK (on_window_destroyed), actor); window_info->destroy_id = g_signal_connect (actor, "destroy", G_CALLBACK (on_actor_destroyed), self); |