linux: Use D-Bus to inhibit screensaver

This commit is contained in:
robxnano 2024-09-23 17:51:04 +01:00
commit 2748771cb3
No known key found for this signature in database
GPG key ID: 9FB6B03B782D1E42
9 changed files with 229 additions and 41 deletions

View file

@ -1686,12 +1686,7 @@ void MainWindow::UpdateScreenSaverInhibition()
m_is_screensaver_inhibited = inhibit;
#ifdef HAVE_X11
if (GetWindowSystemType() == WindowSystemType::X11)
UICommon::InhibitScreenSaver(winId(), inhibit);
#else
UICommon::InhibitScreenSaver(inhibit);
#endif
}
bool MainWindow::eventFilter(QObject* object, QEvent* event)