diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index 2b966876e2..24d3875349 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -168,7 +168,7 @@ class PlatformX11 : public Platform if (fullscreen) { - X11Utils::EWMH_Fullscreen(dpy, _NET_WM_STATE_TOGGLE); + X11Utils::ToggleFullscreen(dpy); #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::EWMH_Fullscreen(dpy, _NET_WM_STATE_TOGGLE); + X11Utils::ToggleFullscreen(dpy); #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 b1e1ddb0ff..d011a03556 100644 --- a/Source/Core/DolphinWX/X11Utils.cpp +++ b/Source/Core/DolphinWX/X11Utils.cpp @@ -24,12 +24,8 @@ extern char **environ; namespace X11Utils { -void EWMH_Fullscreen(Display *dpy, int action) +void ToggleFullscreen(Display *dpy) { - _assert_(action == _NET_WM_STATE_REMOVE || - action == _NET_WM_STATE_ADD || - action == _NET_WM_STATE_TOGGLE); - Window win = (Window)Core::GetWindowHandle(); // Init X event structure for _NET_WM_STATE_FULLSCREEN client message @@ -38,7 +34,7 @@ void EWMH_Fullscreen(Display *dpy, int action) event.xclient.message_type = XInternAtom(dpy, "_NET_WM_STATE", False); event.xclient.window = win; event.xclient.format = 32; - event.xclient.data.l[0] = action; + event.xclient.data.l[0] = _NET_WM_STATE_TOGGLE; event.xclient.data.l[1] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False); // Send the event diff --git a/Source/Core/DolphinWX/X11Utils.h b/Source/Core/DolphinWX/X11Utils.h index d0b5dc0292..461dfa470d 100644 --- a/Source/Core/DolphinWX/X11Utils.h +++ b/Source/Core/DolphinWX/X11Utils.h @@ -34,7 +34,7 @@ namespace X11Utils { -void EWMH_Fullscreen(Display *dpy, int action); +void ToggleFullscreen(Display *dpy); #if defined(HAVE_WX) && HAVE_WX Window XWindowFromHandle(void *Handle); Display *XDisplayFromHandle(void *Handle);