From 7bb9f502cf4505d7f30b8f0a3303e05464fafe44 Mon Sep 17 00:00:00 2001 From: Shiz Date: Sat, 29 Jun 2019 02:31:24 +0200 Subject: [PATCH] Core/UICommon: fix compilation without X RandR support --- Source/Core/UICommon/UICommon.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp index 935d07b043f..27fe62307d1 100644 --- a/Source/Core/UICommon/UICommon.cpp +++ b/Source/Core/UICommon/UICommon.cpp @@ -367,16 +367,15 @@ bool TriggerSTMPowerEvent() return true; } -#if defined(HAVE_XRANDR) && HAVE_X11 -void EnableScreenSaver(Window win, bool enable) -#else +#if !defined(HAVE_XRANDR) || !HAVE_XRANDR void EnableScreenSaver(bool enable) -#endif +{ +#else +void EnableScreenSaver(Window win, bool enable) { // Inhibit the screensaver. Depending on the operating system this may also // disable low-power states and/or screen dimming. -#if defined(HAVE_X11) && HAVE_X11 if (Config::Get(Config::MAIN_DISABLE_SCREENSAVER)) { X11Utils::InhibitScreensaver(win, !enable);