The window server provides support for a password screen, which can be configured to request a password at various times, such as once a day or every time the machine is switched on.
In order to implement password protection, one window in the system is made the password window, by calling RWindowBase::PasswordWindow()
. A parameter passed to this function determines at which times the password is requested (once a day, machine switch-on, etc.).
When an on event occurs, and a password window exists, the window server may or may not enter its password mode, depending on the parameter given to RWindowBase::PasswordWindow()
. In password mode, it does the following:
Makes the password window visible and moves it to the front of the screen. It does this by giving it ordinal position 0 within its window group and setting its window group's priority to KPasswordWindowGroupPriority
. This means that no other windows or window groups can be moved in front of the password window
Disables capture keys from all other applications.
Sends an EEventPassword
message to the window group owning the password window. The password window should then perform password handling appropriately.
The window server remains in password mode until the session that owns the password window calls RWsSession::PasswordEntered()
.