blackjackshellac / kitchenTimer

Gnome shell kitchen timer extension
GNU General Public License v3.0
21 stars 11 forks source link

Prevent lock screen when timers running #46

Closed blackjackshellac closed 3 years ago

blackjackshellac commented 3 years ago

Session manager dbus Inhibit and Uninhibit with flags 4, 8.

Inhibit ()

Inhibit (in  's' app_id,
         in  'u' toplevel_xid,
         in  's' reason,
         in  'u' flags,
         out 'u' inhibit_cookie)

Applications should invoke this method when they begin an operation that should not be interrupted, such as
creating a CD or DVD. The types of actions that may be blocked are specified by the flags parameter. When the
application completes the operation it should call Uninhibit() or disconnect from the session bus.

Applications should not expect that they will always be able to block the action. In most cases, users will be given
the option to force the action to take place.

Reasons should be short and to the point.

The flags parameter must include at least one of the following:

    1: Inhibit logging out
    2: Inhibit user switching
    4: Inhibit suspending the session or computer
    8: Inhibit the session being marked as idle

Values for flags may be bitwise or'ed together.

The returned cookie is used to uniquely identify this request. It should be used as an argument to Uninhibit() in order to remove the request.

app_id:
    The application identifier
toplevel_xid:
    The toplevel X window identifier
reason:
    The reason for the inhibit
flags:
    Flags that spefify what should be inhibited
inhibit_cookie:
    The cookie
Uninhibit ()

Uninhibit (in  'u' inhibit_cookie)

Cancel a previous call to Inhibit() identified by the cookie.

inhibit_cookie:
    The cookie

https://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#id344989