From 071e175a1d1449e078d2279578dbe9a82dbcba93 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 6 Aug 2014 22:17:21 -0400 Subject: [PATCH] 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. --- Source/Core/DolphinWX/MainNoGUI.cpp | 4 ++-- Source/Core/DolphinWX/X11Utils.cpp | 4 +--- Source/Core/DolphinWX/X11Utils.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index 24d3875349..4f8d98d110 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -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 diff --git a/Source/Core/DolphinWX/X11Utils.cpp b/Source/Core/DolphinWX/X11Utils.cpp index d011a03556..0072a740cd 100644 --- a/Source/Core/DolphinWX/X11Utils.cpp +++ b/Source/Core/DolphinWX/X11Utils.cpp @@ -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; diff --git a/Source/Core/DolphinWX/X11Utils.h b/Source/Core/DolphinWX/X11Utils.h index 461dfa470d..b68a1babe6 100644 --- a/Source/Core/DolphinWX/X11Utils.h +++ b/Source/Core/DolphinWX/X11Utils.h @@ -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);