diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-05-08 11:17:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-05-09 11:20:29 +0200 |
commit | 796fb57d7b2e2ea05795dc49c4438c25adc26fd4 (patch) | |
tree | 513aa385c811c54955dfd35339391b58da90e352 /vcl/qt5 | |
parent | 4a8a24be5a378308680a0b6e2e246d5d9df414c4 (diff) |
Related: tdf#142176 rearrange screensaver inhibiter to be more generic
and for not-x11 I see gtk just uses 0 for xid (which is called
window_system_id there now)
Change-Id: I9248bcceaa2d21d34133dea80697776df0aa8c6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151560
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/QtFrame.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index 74dfc98445af..ed5c0538e5cb 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -741,19 +741,19 @@ void QtFrame::StartPresentation(bool bStart) // meh - so there's no Qt platform independent solution // https://forum.qt.io/topic/38504/solved-qdialog-in-fullscreen-disable-os-screensaver assert(m_aSystemData.platform != SystemEnvData::Platform::Invalid); - const bool bIsX11 = m_aSystemData.platform == SystemEnvData::Platform::Xcb; - std::optional<unsigned int> aRootWindow; + unsigned int nRootWindow(0); std::optional<Display*> aDisplay; #if CHECK_QT5_USING_X11 if (QX11Info::isPlatformX11()) { - aRootWindow = QX11Info::appRootWindow(); + nRootWindow = QX11Info::appRootWindow(); aDisplay = QX11Info::display(); } #endif - m_ScreenSaverInhibitor.inhibit(bStart, u"presentation", bIsX11, aRootWindow, aDisplay); + m_SessionManagerInhibitor.inhibit(bStart, u"presentation", APPLICATION_INHIBIT_IDLE, + nRootWindow, aDisplay); #else Q_UNUSED(bStart) #endif |