ScreenShield: don't create an unlock dialog if the screen is not locked

Creating the unlock dialog starts the GDM conversation and activates
the fingerprint sensors, so don't do it unless necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=697833
This commit is contained in:
Giovanni Campagna 2013-06-08 18:59:20 +02:00
parent aefdf15a45
commit 1b8580f12b

View File

@ -622,7 +622,8 @@ const ScreenShield = new Lang.Class({
if (!isEnter && !(GLib.unichar_isprint(unichar) || symbol == Clutter.KEY_Escape))
return false;
if (this._ensureUnlockDialog(true, true) &&
if (this._isLocked &&
this._ensureUnlockDialog(true, true) &&
GLib.unichar_isgraph(unichar))
this._dialog.addCharacter(unichar);