diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-05-08 10:43:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-05-09 11:20:08 +0200 |
commit | 4a8a24be5a378308680a0b6e2e246d5d9df414c4 (patch) | |
tree | ac712e3098b53f8dc22cfef4991914d4e0303f87 /vcl/unx | |
parent | b7ec54b7c6e85d507066442de3b7398f34bbb653 (diff) |
Related: tdf#142176 document what the other inhibit options are
via an enum like the gtk one so it can be seen how to inhibit logging
out due to unsaved changes
Change-Id: I07609cfb7a97b5b6c1b94a09b7b79bcca308d5d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151559
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/window/screensaverinhibitor.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx index ec19fad09e5d..a2274028b526 100644 --- a/vcl/unx/generic/window/screensaverinhibitor.cxx +++ b/vcl/unx/generic/window/screensaverinhibitor.cxx @@ -207,6 +207,16 @@ void ScreenSaverInhibitor::inhibitFDOPM( bool bInhibit, const char* appname, con #endif // ENABLE_GIO } +#if ENABLE_GIO +enum ApplicationInhibitFlags +{ + APPLICATION_INHIBIT_LOGOUT = (1 << 0), + APPLICATION_INHIBIT_SWITCH = (1 << 1), + APPLICATION_INHIBIT_SUSPEND = (1 << 2), + APPLICATION_INHIBIT_IDLE = (1 << 3) // Inhibit the session being marked as idle +}; +#endif + void ScreenSaverInhibitor::inhibitGSM( bool bInhibit, const char* appname, const char* reason, const unsigned int xid ) { #if ENABLE_GIO @@ -218,7 +228,7 @@ void ScreenSaverInhibitor::inhibitGSM( bool bInhibit, const char* appname, const appname, xid, reason, - 8 //Inhibit the session being marked as idle + APPLICATION_INHIBIT_IDLE ), G_DBUS_CALL_FLAGS_NONE, -1, nullptr, &error ); }, |