mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Fix windows not detaching on monitor disconnect
Regression introduced by 04f559e28d
.
Related to #1106.
This commit is contained in:
parent
bf09dba95b
commit
fcedb0be32
@ -107,6 +107,17 @@ void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement)
|
|||||||
else if (action == GLFW_DISCONNECTED)
|
else if (action == GLFW_DISCONNECTED)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
_GLFWwindow* window;
|
||||||
|
|
||||||
|
for (window = _glfw.windowListHead; window; window = window->next)
|
||||||
|
{
|
||||||
|
if (window->monitor == monitor)
|
||||||
|
{
|
||||||
|
int width, height;
|
||||||
|
_glfwPlatformGetWindowSize(window, &width, &height);
|
||||||
|
_glfwPlatformSetWindowMonitor(window, NULL, 0, 0, width, height, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < _glfw.monitorCount; i++)
|
for (i = 0; i < _glfw.monitorCount; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user