[gnome-shell] AuthPrompt: properly remove user widgets
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] AuthPrompt: properly remove user widgets
- Date: Mon, 13 Oct 2014 15:50:24 +0000 (UTC)
commit d8d046f2b3ed3d9ec3d46ac17cb185838dae8a28
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Oct 9 12:05:11 2014 -0400
AuthPrompt: properly remove user widgets
When replacing a user widget, we need to destroy the child, not just
unparent it, or it will leak.
https://bugzilla.gnome.org/show_bug.cgi?id=738256
js/gdm/authPrompt.js | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 4160a56..3b435de 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -419,11 +419,13 @@ const AuthPrompt = new Lang.Class({
},
setUser: function(user) {
+ let oldChild = this._userWell.get_child();
+ if (oldChild)
+ oldChild.destroy();
+
if (user) {
let userWidget = new UserWidget.UserWidget(user);
this._userWell.set_child(userWidget.actor);
- } else {
- this._userWell.set_child(null);
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]