Method using gtk_application_inhibit() #407
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Aims to close: #404
Add support for unix systems with GTK
PyGObject
(gi
) python library installed either on the current python environment or the system python site packages.Details
gi
, package name:PyGObject
) for inhibiting sleep/idle. This is the PyGObject interface to the gtk_application_inhibit() function.gi
module for accessing GTK functions from python. User is not required to have installed the in their current (virtual) environment. It's just faster to use (300ms vs 5ms) ifgi
is available in the current python environment. Most people probably won't care if their long running script takes a 300ms more, and not having to install PyGObject is a nice thing as the installation will require compilation step(s), so it's a bit trickier and slower to install than a pure python package.Inhibitor
, which should comply with the new Inhibitor protocol: There must be astart(self, *args)
andstop(self)
methods. The*args
are positional arguments given to the server and passed to the inhibitor.TODO