[server] Support inhibiting the IdleInterface
ClosedPublic

Authored by graesslin on Oct 20 2017, 2:38 PM.

Details

Summary

This is a preparation step to support idle_inhibit_unstable_v1 protocol.
As in Plasma powermanagement, screen locking, dpms, etc. is not
controlled by the wayland compositor but by external components through
the IdleTimeout interface the compositor needs a way to inhibit the idle
timeouts. So once idle_inhibit_unstable_v1 is implemented the compositor
can hook this up to the inhibit API in IdleInterface and thus inhibit
powermanagement, etc. as requested by the idle_inhibit_unstable_v1
protocol.

The added API is straight forward:

  • inhibit: inhibits idle timeouts
  • uninhibit: uninhibits again
  • inhibit and uninhibit must be called in pairs, so twice inhibit,

means uninhibit must be called twice

  • isInhibited: whether it's inhibited
  • and a signal that it changed

The signal is mostly used internally to stop the timers.

Test Plan

Test case extended

Diff Detail

Repository
R127 KWayland
Branch
inhibit-idle
Lint
No Linters Available
Unit
No Unit Test Coverage
graesslin created this revision.Oct 20 2017, 2:38 PM
Restricted Application added projects: Plasma on Wayland, Frameworks. · View Herald TranscriptOct 20 2017, 2:38 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Nov 6 2017, 5:29 PM
This revision is now accepted and ready to land.Nov 6 2017, 5:29 PM
This revision was automatically updated to reflect the committed changes.