[PATCH] core: Add infrastructure for inhibiting suspend in jobs
authorKai Uwe Broulik <kde@privat.broulik.de>
Sun, 20 Apr 2025 10:48:26 +0000 (12:48 +0200)
committerAurélien COUDERC <coucouf@debian.org>
Sun, 8 Jun 2025 12:42:29 +0000 (14:42 +0200)
commitd70eb6ec99bc5e8b766dd1a90bbb7b55c9f7553b
tree9931832d38bf2de9d4d7b214f2eade9b3906303c
parent9e6b299dede3d664d0f4e2255e8fb14743f8c0e8
[PATCH] core: Add infrastructure for inhibiting suspend in jobs

This calls the freedesktop Inhibit interface on DBus which will
inhibit suspend (but not display power management/screensaver).
When inside a sandbox it instead calls the XDG Desktop Portal
Inhibit interface.

When a job is destroyed or gets suspended, the inhibition is lifted.
When a job is resumed, `doInhibitSuspend` is called again to re-instate
the inhibition.

It is the job's responsibility to call `doInhibitSuspend` at
the appropriate time (e.g. in doStart/slotStart).

Gbp-Pq: Name upstream_3c3d5904_core-Add-infrastructure-for-inhibiting-suspend-in-jobs.patch
src/core/CMakeLists.txt
src/core/config-kiocore.h.cmake
src/core/job.cpp
src/core/job_p.h
src/core/org.freedesktop.PowerManagement.Inhibit.xml [new file with mode: 0644]
src/core/org.freedesktop.portal.Inhibit.xml [new file with mode: 0644]
src/core/org.freedesktop.portal.Request.xml [new file with mode: 0644]