1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Added use of frame size to multi-window test.

This commit is contained in:
Camilla Berglund 2014-03-30 11:30:40 +02:00
parent eb3f75e03e
commit 40f69d7abf

View File

@ -60,6 +60,8 @@ int main(void)
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
int left, top, right, bottom;
windows[i] = glfwCreateWindow(200, 200, titles[i], NULL, NULL); windows[i] = glfwCreateWindow(200, 200, titles[i], NULL, NULL);
if (!windows[i]) if (!windows[i])
{ {
@ -73,7 +75,10 @@ int main(void)
i ? 0.f : 1.f, i ? 0.f : 1.f,
0.f); 0.f);
glfwSetWindowPos(windows[i], 100 + (i & 1) * 300, 100 + (i >> 1) * 300); glfwGetWindowFrameSize(windows[i], &left, &top, &right, &bottom);
glfwSetWindowPos(windows[i],
100 + (i & 1) * (200 + left + right),
100 + (i >> 1) * (200 + top + bottom));
glfwShowWindow(windows[i]); glfwShowWindow(windows[i]);
} }