Skip to content
Snippets Groups Projects
Commit fcedb0be authored by Camilla Löwy's avatar Camilla Löwy
Browse files

Fix windows not detaching on monitor disconnect

Regression introduced by 04f559e2.

Related to #1106.
parent bf09dba9
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,17 @@ void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement)
else if (action == GLFW_DISCONNECTED)
{
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++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment