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>
diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx
index ec19fad..a227402 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 );
},