[gnome-shell] loginDialog: reset greeter proxy on auth prompt reset
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] loginDialog: reset greeter proxy on auth prompt reset
- Date: Thu, 22 Jan 2015 21:55:39 +0000 (UTC)
commit c556d28b986a2ec1173f88e5904d8d1d03a0a55c
Author: Ray Strode <rstrode redhat com>
Date: Thu Jan 22 13:39:46 2015 -0500
loginDialog: reset greeter proxy on auth prompt reset
Normally when a user uses the login screen to log in, the
login screen gets killed and the user session takes over
the display.
This doesn't happen for wayland sessions, though. Instead,
the login screen gets reset, and the wayland session is started
on another VT.
The greeter proxy object needs to be recreated after this reset,
since it's associated with state no longer coupled to the login
screen after the reset.
This commit moves greeter proxy creation to happen at reset time.
https://bugzilla.gnome.org/show_bug.cgi?id=743371
js/gdm/loginDialog.js | 32 +++++++++++++++++++-------------
1 files changed, 19 insertions(+), 13 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index bef41ed..b7eff68 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -375,18 +375,7 @@ const LoginDialog = new Lang.Class({
parentActor.add_child(this.actor);
this._userManager = AccountsService.UserManager.get_default()
- let gdmClient = new Gdm.Client();
-
- if (GLib.getenv('GDM_GREETER_TEST') != '1') {
- this._greeter = gdmClient.get_greeter_sync(null);
-
- this._defaultSessionChangedId = this._greeter.connect('default-session-name-changed',
- Lang.bind(this,
this._onDefaultSessionChanged));
- this._sessionOpenedId = this._greeter.connect('session-opened',
- Lang.bind(this, this._onSessionOpened));
- this._timedLoginRequestedId = this._greeter.connect('timed-login-requested',
- Lang.bind(this,
this._onTimedLoginRequested));
- }
+ this._gdmClient = new Gdm.Client();
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
@@ -416,7 +405,7 @@ const LoginDialog = new Lang.Class({
x_fill: true,
y_fill: true });
- this._authPrompt = new AuthPrompt.AuthPrompt(gdmClient, AuthPrompt.AuthPromptMode.UNLOCK_OR_LOG_IN);
+ this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient,
AuthPrompt.AuthPromptMode.UNLOCK_OR_LOG_IN);
this._authPrompt.connect('prompted', Lang.bind(this, this._onPrompted));
this._authPrompt.connect('reset', Lang.bind(this, this._onReset));
this._authPrompt.hide();
@@ -759,7 +748,24 @@ const LoginDialog = new Lang.Class({
this._showPrompt();
},
+ _resetGreeterProxy: function() {
+ if (GLib.getenv('GDM_GREETER_TEST') != '1') {
+ if (this._greeter) {
+ this._greeter.run_dispose();
+ }
+ this._greeter = this._gdmClient.get_greeter_sync(null);
+
+ this._defaultSessionChangedId = this._greeter.connect('default-session-name-changed',
+ Lang.bind(this,
this._onDefaultSessionChanged));
+ this._sessionOpenedId = this._greeter.connect('session-opened',
+ Lang.bind(this, this._onSessionOpened));
+ this._timedLoginRequestedId = this._greeter.connect('timed-login-requested',
+ Lang.bind(this,
this._onTimedLoginRequested));
+ }
+ },
+
_onReset: function(authPrompt, beginRequest) {
+ this._resetGreeterProxy();
this._sessionMenuButton.updateSensitivity(true);
this._user = null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]