Cleanup X11 and XRANDR Macros
This fixes build with X11 enabled and XRANDR disabled.
This commit is contained in:
parent
b6e9cca64f
commit
29eaf09be4
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include "UICommon/X11Utils.h"
|
#include "UICommon/X11Utils.h"
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
|
|
|
@ -1463,7 +1463,7 @@ void MainWindow::UpdateScreenSaverInhibition()
|
||||||
|
|
||||||
m_is_screensaver_inhibited = inhibit;
|
m_is_screensaver_inhibited = inhibit;
|
||||||
|
|
||||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
#ifdef HAVE_X11
|
||||||
if (GetWindowSystemType() == WindowSystemType::X11)
|
if (GetWindowSystemType() == WindowSystemType::X11)
|
||||||
UICommon::InhibitScreenSaver(winId(), inhibit);
|
UICommon::InhibitScreenSaver(winId(), inhibit);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define CIFACE_USE_WIN32
|
#define CIFACE_USE_WIN32
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_X11) && HAVE_X11
|
#ifdef HAVE_X11
|
||||||
#define CIFACE_USE_XLIB
|
#define CIFACE_USE_XLIB
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#include "UICommon/UICommon.h"
|
#include "UICommon/UICommon.h"
|
||||||
#include "UICommon/USBUtils.h"
|
#include "UICommon/USBUtils.h"
|
||||||
|
|
||||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
#ifdef HAVE_X11
|
||||||
#include "UICommon/X11Utils.h"
|
#include "UICommon/X11Utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ bool TriggerSTMPowerEvent()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
#ifdef HAVE_X11
|
||||||
void InhibitScreenSaver(Window win, bool inhibit)
|
void InhibitScreenSaver(Window win, bool inhibit)
|
||||||
#else
|
#else
|
||||||
void InhibitScreenSaver(bool inhibit)
|
void InhibitScreenSaver(bool inhibit)
|
||||||
|
@ -403,7 +403,7 @@ void InhibitScreenSaver(bool inhibit)
|
||||||
// Inhibit the screensaver. Depending on the operating system this may also
|
// Inhibit the screensaver. Depending on the operating system this may also
|
||||||
// disable low-power states and/or screen dimming.
|
// disable low-power states and/or screen dimming.
|
||||||
|
|
||||||
#if defined(HAVE_X11) && HAVE_X11
|
#ifdef HAVE_X11
|
||||||
X11Utils::InhibitScreensaver(win, inhibit);
|
X11Utils::InhibitScreensaver(win, inhibit);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace UICommon
|
||||||
void Init();
|
void Init();
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
|
||||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
#ifdef HAVE_X11
|
||||||
void InhibitScreenSaver(unsigned long win, bool enable);
|
void InhibitScreenSaver(unsigned long win, bool enable);
|
||||||
#else
|
#else
|
||||||
void InhibitScreenSaver(bool enable);
|
void InhibitScreenSaver(bool enable);
|
||||||
|
|
Loading…
Reference in New Issue