[server] Support inhibiting the IdleInterface

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

Description

[server] Support inhibiting the IdleInterface

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

Reviewers: Frameworks, KWin, Plasma on Wayland

Subscribers: plasma-devel

Tags: Plasma on Wayland, Frameworks

Differential Revision: https://phabricator.kde.org/D8383

Details

Committed
graesslinNov 14 2017, 4:44 PM
Differential Revision
D8383: [server] Support inhibiting the IdleInterface
Parents
R127:7714c50d27e3: GIT_SILENT Upgrade KF5 version to 5.41.0.
Branches
Unknown
Tags
Unknown