Potential uninitialized variable bug in X11 acquireMonitor

Hello,

I was just looking through the GLFW source code and found this issue, that might potentially cause a window, if maximized, to be at a random position, but maybe I also understand the code wrong, that’s why I wanted to ask here. In line 1118 of x11_window.c, we move and resize the window via `XMoveResizeWindow` to a certain width/height and xpos/ypos. The width and height is set via `_glfwGetVideoModeX11`, and in fact is set in all codepaths in that function that don’t set an GLFW error; however, xpos and ypos are not always set in `_glfwGetMonitorPosX11`, leading, if RandR would be not available, for the window to be at a random position set by the uninitialized positions `xpos` and `ypos`, that are just stack variables with whatever content is on the stack. It seems that setting the variables explicitly, like:

int xpos = 0, ypos = 0;
GLFWvidmode mode = {0};

might be the better move, since then we are not dependent on that. Depending on if (0,0) is an acceptable position for RandR unavailability, this could then just work, or maybe there still needs to be an error reported in that case. I am not sure what was intended with this code otherwise, maybe someone here knows better. Maybe this function isn’t even called in that case, and thus it would be unnecessary to initialize, but it at least seems like it’s a bad idea to do it that way to save the relatively small effort to set some ints to 0.

Hypatia of Sva.