X11Utils: Explicitly pass the window to fullscreen into ToggleFullscreen

MainNoGUI is going to create its own window soon, and we need to
fullscreen that one instead of the GLX window.
This commit is contained in:
Jasper St. Pierre 2014-08-06 22:17:21 -04:00
parent 2eacf229ed
commit 071e175a1d
3 changed files with 4 additions and 6 deletions

View File

@ -168,7 +168,7 @@ class PlatformX11 : public Platform
if (fullscreen)
{
X11Utils::ToggleFullscreen(dpy);
X11Utils::ToggleFullscreen(dpy, win);
#if defined(HAVE_XRANDR) && HAVE_XRANDR
XRRConfig->ToggleDisplayMode(True);
#endif
@ -204,7 +204,7 @@ class PlatformX11 : public Platform
else if ((key == XK_Return) && (event.xkey.state & Mod1Mask))
{
fullscreen = !fullscreen;
X11Utils::ToggleFullscreen(dpy);
X11Utils::ToggleFullscreen(dpy, win);
#if defined(HAVE_XRANDR) && HAVE_XRANDR
XRRConfig->ToggleDisplayMode(fullscreen);
#endif

View File

@ -24,10 +24,8 @@ extern char **environ;
namespace X11Utils
{
void ToggleFullscreen(Display *dpy)
void ToggleFullscreen(Display *dpy, Window win)
{
Window win = (Window)Core::GetWindowHandle();
// Init X event structure for _NET_WM_STATE_FULLSCREEN client message
XEvent event;
event.xclient.type = ClientMessage;

View File

@ -34,7 +34,7 @@
namespace X11Utils
{
void ToggleFullscreen(Display *dpy);
void ToggleFullscreen(Display *dpy, Window win);
#if defined(HAVE_WX) && HAVE_WX
Window XWindowFromHandle(void *Handle);
Display *XDisplayFromHandle(void *Handle);