[User Switcher] Fix session switching when automatic screen locking is enabled

Authored by broulik on Feb 25 2016, 9:16 PM.

Description

[User Switcher] Fix session switching when automatic screen locking is enabled

When automatic screen locking is enabled, we want to ensure the screen is fully locked
before we switch sessions or go to the login screen to avoid brief exposure of the desktop
when we return.

This check happens asynchronously and because the User Switcher dialog closes immediately
after issuing the switch request, the SessionsModel is already destroyed and the reply is never
actually processed.

BUG: 356945
FIXED-IN: 5.5.5

Differential Revision: https://phabricator.kde.org/D1020

Details