• Simon McVittie's avatar
    ShellApp: Use g_signal_connect_object for window signals · 0f531d8c
    Simon McVittie authored
    A window being unmanaged can cause the ShellApp to be removed from
    the ShellAppSystem, which if we are unlucky is the app's last
    reference, causing it to be disposed and freed. It would be bad if this
    happened before we finished handling the signal.
    
    Use g_signal_connect_object to ensure that a reference is held to
    the ShellApp for the duration of the signal handler, delaying its
    last-unref.
    
    In particular, when a signal handler calls _shell_app_remove_window(),
    there is a brief period for which ShellApp breaks the intended
    invariant (see !497) that app->running_state is non-NULL if and only if
    app->running_state->windows is also non-NULL (non-empty). Freeing the
    ShellApp at this point would cause a crash. This seems likely to be the
    root cause of <#750>,
    <#822> and
    <https://bugs.debian.org/926212>.
    Signed-off-by: 's avatarSimon McVittie <smcv@debian.org>
    0f531d8c
Name
Last commit
Last update
..
calendar-server Loading commit data...
hotplug-sniffer Loading commit data...
st Loading commit data...
tray Loading commit data...
data-to-c.pl Loading commit data...
gnome-shell-extension-prefs.c Loading commit data...
gnome-shell-extension-tool.in Loading commit data...
gnome-shell-perf-tool.in Loading commit data...
gnome-shell-plugin.c Loading commit data...
gnome-shell-portal-helper.c Loading commit data...
gtkactionmuxer.c Loading commit data...
gtkactionmuxer.h Loading commit data...
gtkactionobservable.c Loading commit data...
gtkactionobservable.h Loading commit data...
gtkactionobserver.c Loading commit data...
gtkactionobserver.h Loading commit data...
main.c Loading commit data...
meson.build Loading commit data...
org.gtk.Application.xml Loading commit data...
run-js-test.c Loading commit data...
shell-action-modes.h Loading commit data...
shell-app-private.h Loading commit data...
shell-app-system-private.h Loading commit data...
shell-app-system.c Loading commit data...
shell-app-system.h Loading commit data...
shell-app-usage.c Loading commit data...
shell-app-usage.h Loading commit data...
shell-app.c Loading commit data...
shell-app.h Loading commit data...
shell-embedded-window-private.h Loading commit data...
shell-embedded-window.c Loading commit data...
shell-embedded-window.h Loading commit data...
shell-global-private.h Loading commit data...
shell-global.c Loading commit data...
shell-global.h Loading commit data...
shell-glsl-quad.c Loading commit data...
shell-glsl-quad.h Loading commit data...
shell-gtk-embed.c Loading commit data...
shell-gtk-embed.h Loading commit data...
shell-invert-lightness-effect.c Loading commit data...
shell-invert-lightness-effect.h Loading commit data...
shell-keyring-prompt.c Loading commit data...
shell-keyring-prompt.h Loading commit data...
shell-mount-operation.c Loading commit data...
shell-mount-operation.h Loading commit data...
shell-network-agent.c Loading commit data...
shell-network-agent.h Loading commit data...
shell-perf-helper.c Loading commit data...
shell-perf-log.c Loading commit data...
shell-perf-log.h Loading commit data...
shell-polkit-authentication-agent.c Loading commit data...
shell-polkit-authentication-agent.h Loading commit data...
shell-recorder-src.c Loading commit data...
shell-recorder-src.h Loading commit data...
shell-recorder.c Loading commit data...
shell-recorder.h Loading commit data...
shell-screenshot.c Loading commit data...
shell-screenshot.h Loading commit data...
shell-secure-text-buffer.c Loading commit data...
shell-secure-text-buffer.h Loading commit data...
shell-stack.c Loading commit data...
shell-stack.h Loading commit data...
shell-tray-icon.c Loading commit data...
shell-tray-icon.h Loading commit data...
shell-tray-manager.c Loading commit data...
shell-tray-manager.h Loading commit data...
shell-util.c Loading commit data...
shell-util.h Loading commit data...
shell-window-tracker-private.h Loading commit data...
shell-window-tracker.c Loading commit data...
shell-window-tracker.h Loading commit data...
shell-wm-private.h Loading commit data...
shell-wm.c Loading commit data...
shell-wm.h Loading commit data...