-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
idle_inhibit: Session lock and unmapped surface fixes #8175
base: master
Are you sure you want to change the base?
Conversation
I mistested. See below. |
be46662
to
f1b8837
Compare
I have added an explicit map check to layer and lock surfaces, and added a test for whether the layer surface output is enabled while we were at it. Could I get you to retest if that did the trick? |
Needs rebase, won't build with latest wlroots:
I tested f1b8837 with an older wlroots and can confirm that this fixes #8080 If I run my test code (which creates a create a layer-shell surface, attaches an idle inhibitor to it, but never maps it). The idle timeouts trigger as expected.
|
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.
Layer surfaces do not have a view, and while they can be occluded they are always visible on their associated output - assuming it is enabled.
We have historically considered surfaces without a view visible. This made sense in case of layer surfaces which do not have a view, but it also allows unmapped surfaces to act as global inhibitors irrespective of the current view state, which is not the intention fo the protocol. As we now explicitly handle layer surfaces, assume that views are only visible if they can be found and their visibility checked.
While we we cannot easily check for true visibility of layer surfaces as easily as for views, we can check at least check that the output associated with the surface is enabled.
f1b8837
to
1a1bc78
Compare
We were not correctly handling idle inhibitor visibility in case of session locks, nor in case of unmapped surfaces.
This tries to fix both. Not yet tested.