CHANGE: Do not touch the input params x and y, just pass it through to a possible callback.

This commit is contained in:
Carsten Tewes 2022-11-21 00:42:23 +01:00
parent a58d1bf3ef
commit d838446882

View File

@ -89,16 +89,14 @@ void _glfwInputWindowPos(_GLFWwindow* window, int x, int y)
// We then check if windowMon is really the monitor where // We then check if windowMon is really the monitor where
// the window is located and if not we set the monitor for // the window is located and if not we set the monitor for
// that window to the other monitor including width, height // that window to the other monitor including width, height
// and refreshrate. At last we simply set the position vars // and refreshrate.
// to 0, because the relative position of a fullscreen window
// content area moving from one monitor to another is always 0, 0
detectedMon = glfwGetMonitorFromWindow((GLFWwindow*) window); detectedMon = glfwGetMonitorFromWindow((GLFWwindow*) window);
if (detectedMon != NULL && windowMon != detectedMon) if (detectedMon != NULL && windowMon != detectedMon)
{ {
vidmode = glfwGetVideoMode(detectedMon); vidmode = glfwGetVideoMode(detectedMon);
if (vidmode != NULL) if (vidmode != NULL)
{ {
glfwSetWindowMonitor((GLFWwindow*) window, detectedMon, x = 0, y = 0, vidmode->width, vidmode->height, vidmode->refreshRate); glfwSetWindowMonitor((GLFWwindow*) window, detectedMon, 0, 0, vidmode->width, vidmode->height, vidmode->refreshRate);
} }
} }
} }