]> git.mdlowis.com Git - proto/labwc.git/commit
seat: move session-lock check down to seat_focus() level
authorJohn Lindgren <john@jlindgren.net>
Sun, 15 Oct 2023 06:59:58 +0000 (02:59 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 15 Oct 2023 20:32:41 +0000 (21:32 +0100)
commit8bb2e2123ff8c4ae1fd77cf61a55c8ffcdae1444
tree3d47bd6d73f4cb3e704c876d51d0b441cdb849c2
parentb053c9e375a1a36d6ce5762b5045a05b1f3ad20c
seat: move session-lock check down to seat_focus() level

We were checking for a locked session in desktop_focus_view(), but there
are several other call sites of seat_focus_surface() which were missing
such a check. Any one of those could cause the lock screen to lose focus
(making the session impossible to unlock) or another surface to gain it
(breaching the session lock).

To fix the issue, make any call to seat_focus_surface() no-op when the
session is locked. Add a specific seat_focus_lock_surface() function
which is the only way to bypass the check and is called only from
session-lock.c.
include/labwc.h
src/desktop.c
src/seat.c
src/session-lock.c