GNOME Bugzilla – Bug 682041
Timeout for entering a password is far too short
Last modified: 2012-08-17 02:59:15 UTC
Well, this was the original bug. The reality is that, after fixing bug 682009, the timeout is a bit too long, so we need to have one ourselves.
Created attachment 221452 [details] [review] ShellIdleMonitor: turn it into a singleton It doesn't make sense to have multiple ShellIdleMonitors, since each has its own GDK filter function, but they all get the same events. In preparation for having it accessed from other places than the message tray, make it a singleton.
Created attachment 221453 [details] [review] UnlockDialog: go back to the lock screen automatically when idle Now that GDM no longer emits auth failures after 25 seconds, we need to handle inactivity ourselves. This has also the advantage that it tracks real inactivity, rather than a timeout from a fixed point in time.
Review of attachment 221452 [details] [review]: Sure. ::: src/shell-idle-monitor.c @@ +326,2 @@ { + static GObject *idle_monitor; static ShellIdleMonitor * @@ +329,1 @@ + if (idle_monitor == NULL) G_UNLIKELY
The timeout should also take user activity into account, so I don't hit a timeout in the middle of entering my password. (Sorry if this is the wrong bug for that...)
No, this is the right bug, and yes, the new timeout implementation does exactly that.
Review of attachment 221453 [details] [review]: Minor nits, but sure. ::: js/ui/unlockDialog.js @@ +21,3 @@ const GdmUtil = imports.gdm.util; +/* The timeout before going back automatically to the lock screen (in seconds) */ // @@ +22,3 @@ +/* The timeout before going back automatically to the lock screen (in seconds) */ +const IDLE_TIMEOUT = 120; I like to use expressions like 2 * 60 * 1000. They're a bit more self-documenting. @@ +173,3 @@ + + this._idleMonitor = Shell.IdleMonitor.get(); + this._idleWatchId = this._idleMonitor.add_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape)); I'd like a comment describing that there's guaranteed user activity by the time we get here, so that the alarm should always fire after two minutes of user activity.
Attachment 221452 [details] pushed as 6a9b199 - ShellIdleMonitor: turn it into a singleton Attachment 221453 [details] pushed as 341b6a1 - UnlockDialog: go back to the lock screen automatically when idle
should probably use the screensaver lock timeout instead of a hard coded value.