Commit Graph

1 Commits

Author SHA1 Message Date
Damien Goutte-Gattat 94d5e050ab
Support old PowerManagement.Inhibit interface as fallback.
Encapsulate the code dealing with requesting an inhibitor lock in a
dedicated Inhibitor class. The lock is acquired in the constructor and
released in the destructor.

The constructor first tries to acquire the lock using the modern
"org.freedesktop.login1.Manager" interface, then tries the previous
"org.freedesktop.PowerManagement.Inhibit" interface as a fallback.
2022-11-13 21:23:23 +00:00