mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Fixed original video mode being overwritten.
This commit is contained in:
parent
63a191eb8d
commit
261f290abf
|
@ -124,6 +124,8 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
|
||||||
race condition
|
race condition
|
||||||
- [X11] Bugfix: The reported window position did not account for the size of
|
- [X11] Bugfix: The reported window position did not account for the size of
|
||||||
the window frame on some WMs
|
the window frame on some WMs
|
||||||
|
- [X11] Bugfix: The original video mode of a monitor was overwritten by calls
|
||||||
|
to glfwSetWindowSize
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
|
@ -111,7 +111,8 @@ void _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor->x11.oldMode = ci->mode;
|
if (monitor->x11.oldMode == None)
|
||||||
|
monitor->x11.oldMode = ci->mode;
|
||||||
|
|
||||||
XRRSetCrtcConfig(_glfw.x11.display,
|
XRRSetCrtcConfig(_glfw.x11.display,
|
||||||
sr, monitor->x11.crtc,
|
sr, monitor->x11.crtc,
|
||||||
|
@ -137,6 +138,9 @@ void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
|
||||||
XRRScreenResources* sr;
|
XRRScreenResources* sr;
|
||||||
XRRCrtcInfo* ci;
|
XRRCrtcInfo* ci;
|
||||||
|
|
||||||
|
if (monitor->x11.oldMode == None)
|
||||||
|
return;
|
||||||
|
|
||||||
sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root);
|
sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root);
|
||||||
ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
|
ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
|
||||||
|
|
||||||
|
@ -151,6 +155,8 @@ void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
|
||||||
|
|
||||||
XRRFreeCrtcInfo(ci);
|
XRRFreeCrtcInfo(ci);
|
||||||
XRRFreeScreenResources(sr);
|
XRRFreeScreenResources(sr);
|
||||||
|
|
||||||
|
monitor->x11.oldMode = None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user