Add support for zwp_idle_inhibit_manager_v1
ClosedPublic

Authored by graesslin on Oct 21 2017, 11:11 AM.

Details

Summary

This protocol allows to indicate that a wl_surface should inhibit idle
actions such as DPMS, screen locking if the surface is visible.

The protocol is quite simple: it just creates an IdleInhibitor for a
Surface. If such an IdleInhibitor exists the Surface is considered to
inhibit idle.

On the server side it is also exposed like that through the API. The
IdleInhibitorInterface is private to the library and only
SurfaceInterface is extended to expose whether it currently inhibits
idle.

CCBUG: 385956

Test Plan

New test case added

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Oct 21 2017, 11:11 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Nov 15 2017, 7:35 PM
davidedmundson added a subscriber: davidedmundson.

I think we need some big discussion about how powerdevil inhbitions, logind inhibitions and this are all going to fit together in a clear coherent way.

But given there are clients using this protocol already, I guess we need this regardless certainly at a protocol level.

src/server/idleinhibit_interface_v1.cpp
74

I think it should

This revision is now accepted and ready to land.Nov 15 2017, 7:35 PM

I think we need some big discussion about how powerdevil inhbitions, logind inhibitions and this are all going to fit together in a clear coherent way.

yeah. I'm not happy with this protocol. I think it's a step backwards as we are again in a situation where an application can just block everything. And we don't have any context information available on why it's blocking.

The only good thing is that KWin is allowed to restrict it to when the window is visible (and that's something I want to implement). And we could probably pass an inhibition to Powerdevil informing it that "Window Foo inhibits power management".

But given there are clients using this protocol already, I guess we need this regardless certainly at a protocol level.

That was the reason why I implemented it. When the protocol was added to wayland-protocols I didn't consider it for implementation as I thought it's useless. But if apps use it and don't use the dbus protocol any more...

This revision was automatically updated to reflect the committed changes.