[server] Support inhibiting the IdleInterface

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



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

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

R127 KWayland
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
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.