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

@ -26,6 +26,7 @@ static constexpr auto X_None = None;
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#include "UICommon/UICommon.h"
#include "UICommon/X11Utils.h"
#include "VideoCommon/Present.h"
@ -110,7 +111,7 @@ bool PlatformX11::Init()
ProcessEvents();
if (Config::Get(Config::MAIN_DISABLE_SCREENSAVER))
X11Utils::InhibitScreensaver(m_window, true);
UICommon::InhibitScreenSaver(true);
#ifdef HAVE_XRANDR
m_xrr_config = new X11Utils::XRRConfiguration(m_display, m_window);