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:
parent
2eacf229ed
commit
071e175a1d
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue