We should better align this model class with SDDM::UserModel to reduce
confusion. Enum classes might be better for some tasks, but they aren't
widely used for Qt model roles, and they require extra casts without
added safety benefits.
Summary:
TL;DR version: whenever you currently would be taken to a session switcher page where the only possible action is to go to SDDM and start a new session, instead just show SDDM immediately instead.
Currently, the session switcher screen suffers from a few UX problems:
- There's a fake "start new session" item that looks like a button but isn't clickable
- Asking to switch users always goes to the screen where you can switch to existing sessions even if there are no existing sessions to switch to, which is an unnecessary extra step
This patch aims to solve those problems in the following ways:
- Don't show a fake "start new session" item in the Breeze theme; instead add a real button in the UI to do this
- When asked to show the session management screen and there is only one session so the on;y thing you could do on that screen is create another session, instead just go to session creation directly
- For themes where the fake "start new session" button is shown, use a better icon that doesn't make it look like a clickable button
BUG: 386361
FIXED-IN: 5.17.0
Depends on D23279
Test Plan:
1. Have only one session > Kickoff/Kicker/dash/Krunner > Switch User -> you go directly to SDDM where you can start a new session
2. Start a new session, then Switch user again -> you go to the session management screen where you can switch to the other session, or start a new one
Videos:
Clicking "Switch User" when there are no other sessions: {F7264475}
Clicking "Switch User" when there is another session to switch to, and then switching to it: {F7264476}
Clicking "Switch User" when there is another session to switch to, and then starting a new session: {F7264480}
Switching between multiple sessions in the session switcher: {F7264483}
If the fake "New Session" item is shown (e.g in other themes), here's what it now looks like: {F7264485}
Reviewers: #plasma, #vdg, GB_2, mart
Reviewed By: #plasma, #vdg, GB_2, mart
Subscribers: GB_2, gregormi, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23283
Since we have a unified screen for logging out and shutting down, the hint is always shown as the user could click on "Logout"
but then shut down anyway.
Differential Revision: https://phabricator.kde.org/D14905
Otherwise it fails to lock the screen and since it waits for the lock screen to show up before switching, it never does it.
BUG: 375941
FIXED-IN: 5.9.1
Differential Revision: https://phabricator.kde.org/D4470
Summary:
This (optionally) appends an entry to the SessionsModel to append a "New
Session" option. The lock screen / user switcher are then modified to
use it.
Messages.sh is modified so all components are covered by the same pot.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2594
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