UICommon: Avoid including Xrandr.h

Xlib has really terrible headers that declare non-namespaced
macros and typedefs for common words.

Just wasted 10 minutes trying to figure out why a unit test failed
to build before I remembered it was Xrandr.h conflicting with our
enum class members again.

To fix the issue, this removes the Display* parameter from the
EnableScreensaver function (which was unused) so we don't have
to include Xrandr.h anymore.
This commit is contained in:
Léo Lam
2018-04-14 16:48:49 +02:00
parent 62269572e4
commit 2f22c76db1
7 changed files with 8 additions and 16 deletions

View File

@ -338,7 +338,7 @@ bool TriggerSTMPowerEvent()
}
#if defined(HAVE_XRANDR) && HAVE_X11
void EnableScreenSaver(Display* display, Window win, bool enable)
void EnableScreenSaver(Window win, bool enable)
#else
void EnableScreenSaver(bool enable)
#endif
@ -349,7 +349,7 @@ void EnableScreenSaver(bool enable)
#if defined(HAVE_X11) && HAVE_X11
if (SConfig::GetInstance().bDisableScreenSaver)
{
X11Utils::InhibitScreensaver(display, win, !enable);
X11Utils::InhibitScreensaver(win, !enable);
}
#endif