GLUT_CURSOR_INHERIT now works, also implemented another cursor
[freeglut] / progs / demos / Resizer / Resizer.cpp
index c2ca76d..0ee64ba 100644 (file)
@@ -12,7 +12,8 @@ GLboolean bChildPosDone = GL_FALSE, bChildSizeDone = GL_FALSE;
 \r
 void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY );\r
 void Redisplay();\r
-void Reshape(int x, int y);\r
+void Reshape(int width, int height);\r
+void Position(int x, int y);\r
 \r
 \r
 \r
@@ -117,6 +118,7 @@ void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY )
             glutKeyboardFunc( SampleKeyboard );\r
             glutDisplayFunc( Redisplay );\r
             glutReshapeFunc( Reshape );\r
+            glutPositionFunc( Position );\r
         }\r
         else\r
         {\r
@@ -166,7 +168,7 @@ void Position(int x, int y)
 {\r
     int win = glutGetWindow();\r
 \r
-    printf("position %s, %dx%d\n",win==nWindow?"main":"child",\r
+    printf("position, %s: (%d,%d)\n",win==nWindow?"top-left of main":"top-left of child relative to parent",\r
         x, y);\r
 }\r
 \r