AppIconMenu: properly destroy on source destroy.

If the source actor is destroyed while the popupMenu is shown -- this
can happen if a non favorite application was closing or crashes -- the
menu actor is improperly destroyed.

This makes the popupMenu close first and does a clean ungrab instead.

https://bugzilla.gnome.org/show_bug.cgi?id=757556
This commit is contained in:
Michele Gaio 2015-11-04 00:56:16 +00:00 committed by Florian Müllner
parent 38406e070c
commit 1545596c7e

View File

@ -1814,7 +1814,7 @@ const AppIconMenu = new Lang.Class({
if (!source.actor.mapped)
this.close();
}));
source.actor.connect('destroy', Lang.bind(this, function () { this.actor.destroy(); }));
source.actor.connect('destroy', Lang.bind(this, this.destroy));
Main.uiGroup.add_actor(this.actor);
},