mirror of
https://github.com/swaywm/sway.git
synced 2026-04-20 06:47:03 -04:00
idle_inhibit: Ignore inhibitors when locked
When a session is locked, no views are visible and there is no way to interact with the user session. This means that all inhibitors based on visibility - with the exception being inhibitors on the session lock surfaces themselves - become inert, allowing the session to go idle. The only inhibitor type on normal views that one could argue should remain active is INHIBIT_IDLE_OPEN, but for now we disable all view inhibitors regardless of type.
This commit is contained in:
parent
8f089f0229
commit
5e6a6ea340
3 changed files with 25 additions and 0 deletions
|
|
@ -234,6 +234,9 @@ static void handle_unlock(struct wl_listener *listener, void *data) {
|
|||
struct sway_output *output = root->outputs->items[i];
|
||||
arrange_layers(output);
|
||||
}
|
||||
|
||||
// Views are now visible, so check if we need to activate inhibition again.
|
||||
sway_idle_inhibit_v1_check_active();
|
||||
}
|
||||
|
||||
static void handle_abandon(struct wl_listener *listener, void *data) {
|
||||
|
|
@ -297,6 +300,10 @@ static void handle_session_lock(struct wl_listener *listener, void *data) {
|
|||
|
||||
wlr_session_lock_v1_send_locked(lock);
|
||||
server.session_lock.lock = sway_lock;
|
||||
|
||||
// The lock screen covers everything, so check if any active inhibition got
|
||||
// deactivated due to lost visibility.
|
||||
sway_idle_inhibit_v1_check_active();
|
||||
}
|
||||
|
||||
static void handle_session_lock_destroy(struct wl_listener *listener, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue