[gnome-shell] loginScreen: reset greeter when coming back to login screen
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] loginScreen: reset greeter when coming back to login screen
- Date: Tue, 25 Mar 2014 14:42:40 +0000 (UTC)
commit be291ee4f92846d42d2012cf5ddf8d8fe5ff27c1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Mar 7 19:35:02 2014 -0500
loginScreen: reset greeter when coming back to login screen
When a user logs in to a wayland session, we keep the login screen
running on the X server with the login screen running in a deactivated mode.
This commit makes sure it get reactivated when the user comes back to
the VT (from user switching, logout or just ctrl-alt-f1).
https://bugzilla.gnome.org/show_bug.cgi?id=726989
js/gdm/loginDialog.js | 33 +++++++++++++++++++++++++++++++++
js/misc/loginManager.js | 1 +
2 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 6e3cb97..68b4ee1 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -36,6 +36,7 @@ const BoxPointer = imports.ui.boxpointer;
const CtrlAltTab = imports.ui.ctrlAltTab;
const GdmUtil = imports.gdm.util;
const Layout = imports.ui.layout;
+const LoginManager = imports.misc.loginManager;
const Main = imports.ui.main;
const PopupMenu = imports.ui.popupMenu;
const Realmd = imports.gdm.realmd;
@@ -472,6 +473,8 @@ const LoginDialog = new Lang.Class({
this._disableUserList = undefined;
this._userListLoaded = false;
+ LoginManager.getLoginManager().getCurrentSessionProxy(Lang.bind(this, this._gotGreeterSessionProxy));
+
// If the user list is enabled, it should take key focus; make sure the
// screen shield is initialized first to prevent it from stealing the
// focus later
@@ -635,6 +638,36 @@ const LoginDialog = new Lang.Class({
this._showPrompt();
},
+ _loginScreenSessionActivated: function() {
+ if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFICATION_SUCCEEDED)
+ return;
+
+ Tweener.addTween(this.actor,
+ { opacity: 255,
+ time: _FADE_ANIMATION_TIME,
+ transition: 'easeOutQuad',
+ onUpdate: function() {
+ let children = Main.layoutManager.uiGroup.get_children();
+
+ for (let i = 0; i < children.length; i++) {
+ if (children[i] != Main.layoutManager.screenShieldGroup)
+ children[i].opacity = this.actor.opacity;
+ }
+ },
+ onUpdateScope: this,
+ onComplete: function() {
+ this._authPrompt.reset();
+ },
+ onCompleteScope: this });
+ },
+
+ _gotGreeterSessionProxy: function(proxy) {
+ proxy.connect('g-properties-changed', Lang.bind(this, function() {
+ if (proxy.Active)
+ this._loginScreenSessionActivated();
+ }));
+ },
+
_startSession: function(serviceName) {
Tweener.addTween(this.actor,
{ opacity: 0,
diff --git a/js/misc/loginManager.js b/js/misc/loginManager.js
index ae87a55..fac5677 100644
--- a/js/misc/loginManager.js
+++ b/js/misc/loginManager.js
@@ -39,6 +39,7 @@ const SystemdLoginSessionIface = '<node> \
<interface name="org.freedesktop.login1.Session"> \
<signal name="Lock" /> \
<signal name="Unlock" /> \
+<property name="Active" type="b" access="read" /> \
</interface> \
</node>';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]