Lock requests read the session state directly in the merged shell
Pull request 14978 merges a lock request that reads the session state directly, after David Heinemeier Hansson wrote that a suspend left the screen unlocked. He opened and merged it into quattro. The merge is not in version 4.0.4.
Hansson wrote that a suspend left the session unlocked, and that the screen did not lock before suspend. He wrote that the shell's status said the session was locked, while the request flag, the session lock, and the secure flag were all false, and the last event was an unlock. He wrote that the lock call trusted the stale status, decided the session was already locked, and returned without locking.
Hansson wrote that the sleep helper kept asking for 12 seconds, never saw a secure lock, and the machine suspended unlocked. He wrote that every later suspend in that shell would have done the same until a restart. He wrote that he could not reproduce the missed update on demand. In the merged shell, a lock request reads those three values itself. The old combined flag remains only for drawing the background and the wallpaper video.