Merge pull request #6644 from leoetlino/uicommon-header
UICommon: Fix header
This commit is contained in:
commit
615c0decb7
|
@ -191,7 +191,7 @@ class PlatformX11 : public Platform
|
|||
s_window_handle = (void*)win;
|
||||
|
||||
if (SConfig::GetInstance().bDisableScreenSaver)
|
||||
X11Utils::InhibitScreensaver(dpy, win, true);
|
||||
X11Utils::InhibitScreensaver(win, true);
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
XRRConfig = new X11Utils::XRRConfiguration(dpy, win);
|
||||
|
|
|
@ -972,10 +972,7 @@ void MainWindow::NetPlayQuit()
|
|||
void MainWindow::EnableScreenSaver(bool enable)
|
||||
{
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
UICommon::EnableScreenSaver(
|
||||
static_cast<Display*>(QGuiApplication::platformNativeInterface()->nativeResourceForWindow(
|
||||
"display", windowHandle())),
|
||||
winId(), enable);
|
||||
UICommon::EnableScreenSaver(winId(), enable);
|
||||
#else
|
||||
UICommon::EnableScreenSaver(enable);
|
||||
#endif
|
||||
|
|
|
@ -708,8 +708,7 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
|||
void CFrame::EnableScreenSaver(bool enable)
|
||||
{
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
UICommon::EnableScreenSaver(X11Utils::XDisplayFromHandle(GetHandle()),
|
||||
X11Utils::XWindowFromHandle(GetHandle()), enable);
|
||||
UICommon::EnableScreenSaver(X11Utils::XWindowFromHandle(GetHandle()), enable);
|
||||
#else
|
||||
UICommon::EnableScreenSaver(enable);
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
namespace UICommon
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ void Init();
|
|||
void Shutdown();
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
void EnableScreenSaver(Display* display, Window win, bool enable);
|
||||
void EnableScreenSaver(unsigned long win, bool enable);
|
||||
#else
|
||||
void EnableScreenSaver(bool enable);
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@ bool ToggleFullscreen(Display* dpy, Window win)
|
|||
return true;
|
||||
}
|
||||
|
||||
void InhibitScreensaver(Display* dpy, Window win, bool suspend)
|
||||
void InhibitScreensaver(Window win, bool suspend)
|
||||
{
|
||||
char id[11];
|
||||
snprintf(id, sizeof(id), "0x%lx", win);
|
||||
|
|
|
@ -24,7 +24,7 @@ bool ToggleFullscreen(Display* dpy, Window win);
|
|||
Window XWindowFromHandle(void* Handle);
|
||||
Display* XDisplayFromHandle(void* Handle);
|
||||
|
||||
void InhibitScreensaver(Display* dpy, Window win, bool suspend);
|
||||
void InhibitScreensaver(Window win, bool suspend);
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
class XRRConfiguration
|
||||
|
|
Loading…
Reference in New Issue