This commit is contained in:
arturo 2013-07-30 06:43:24 -07:00
commit ab8c2083f4

View File

@ -981,14 +981,18 @@ void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
{
Window child;
int x, y;
int left, top;
XTranslateCoordinates(_glfw.x11.display, window->x11.handle, _glfw.x11.root,
0, 0, &x, &y, &child);
XTranslateCoordinates(_glfw.x11.display, window->x11.handle, child,
0, 0, &left, &top, &child);
if (xpos)
*xpos = x;
if (ypos)
*ypos = y;
*ypos = y-top;
}
void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)