session-lock: refactor

- Replaced `session_lock` with `session_lock_manager` which is
  persistent throughout the session.
- Replaced `session_lock->abandoned` with `session_lock_manager->locked`.
  Old `session_lock->abandoned` is equal to
  `!session_lock_manager->lock && session_lock_manager->locked`.
- Eliminated the use of global variables in `session-lock.c`.
- Changed some function names.
This commit is contained in:
tokyo4j 2024-05-30 00:13:34 +09:00 committed by Hiroaki Yamamoto
parent 65f7499f1c
commit a39c8afc10
6 changed files with 111 additions and 110 deletions

View file

@ -621,7 +621,7 @@ seat_focus(struct seat *seat, struct wlr_surface *surface, bool is_lock_surface)
* lock screen may lose focus and become impossible to unlock.
*/
struct server *server = seat->server;
if (server->session_lock && !is_lock_surface) {
if (server->session_lock_manager->locked && !is_lock_surface) {
return;
}