The Window Server provides support for a password screen. This can be configured to request a password at various times, such as once a day or when 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().