signalTracker: Explicitly register destroyable types
We currently assume that any '::destroy' signal on a GObject type has the semantics of the ClutterActor/GtkWidget signal, and should therefore result in all signals being disconnected. But we already have a case where the assumption doesn't hold: ShellWM uses '::destroy' for the closing animation of windows, and the ShellWM object itself remains very valid after the emission. So rather than making assumptions about '::destroy', check objects against a list of destroyable types that are explicitly registered as such. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2226>
This commit is contained in:

committed by
Marge Bot

parent
ba23279f1f
commit
fc4f9f61fa
@ -10,6 +10,7 @@ const GnomeSession = imports.misc.gnomeSession;
|
||||
const Layout = imports.ui.layout;
|
||||
const Main = imports.ui.main;
|
||||
const Params = imports.misc.params;
|
||||
const SignalTracker = imports.misc.signalTracker;
|
||||
|
||||
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
||||
|
||||
@ -493,6 +494,7 @@ var Notification = GObject.registerClass({
|
||||
this.run_dispose();
|
||||
}
|
||||
});
|
||||
SignalTracker.registerDestroyableType(Notification);
|
||||
|
||||
var NotificationBanner = GObject.registerClass({
|
||||
Signals: {
|
||||
@ -795,6 +797,7 @@ var Source = GObject.registerClass({
|
||||
}
|
||||
}
|
||||
});
|
||||
SignalTracker.registerDestroyableType(Source);
|
||||
|
||||
var MessageTray = GObject.registerClass({
|
||||
Signals: {
|
||||
|
Reference in New Issue
Block a user