mirror of
https://github.com/swaywm/sway.git
synced 2026-04-18 06:46:56 -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
|
|
@ -218,6 +218,10 @@ uint32_t view_configure(struct sway_view *view, double lx, double ly, int width,
|
|||
}
|
||||
|
||||
bool view_inhibit_idle(struct sway_view *view) {
|
||||
if (server.session_lock.lock) {
|
||||
return false;
|
||||
}
|
||||
|
||||
struct sway_idle_inhibitor_v1 *user_inhibitor =
|
||||
sway_idle_inhibit_v1_user_inhibitor_for_view(view);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue