X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=progs%2Fdemos%2FResizer%2FResizer.cpp;h=85ce4b890e0dbd21a0c5f4e581116d3eade8d4c5;hb=3cb75b2e5c19ab250a5dfd0ca7da0fe7355269ec;hp=f2ff68a4847b7e8d942766806234a3793886a654;hpb=e964d20799f8adb71ea7c3bcdafabe74d2115cc8;p=freeglut diff --git a/progs/demos/Resizer/Resizer.cpp b/progs/demos/Resizer/Resizer.cpp index f2ff68a..85ce4b8 100644 --- a/progs/demos/Resizer/Resizer.cpp +++ b/progs/demos/Resizer/Resizer.cpp @@ -201,18 +201,30 @@ void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY ) if (nChildWindow!=-1 && cChar=='p') /* Capital P always changes pointer for the main window*/ { glutSetWindow(nChildWindow); - if (glutGet(GLUT_WINDOW_CURSOR)==GLUT_CURSOR_TOP_SIDE) - glutSetCursor(GLUT_CURSOR_RIGHT_ARROW); + if (glutGet(GLUT_WINDOW_CURSOR)==GLUT_CURSOR_TOP_SIDE) + { + glutSetCursor(GLUT_CURSOR_RIGHT_ARROW); + printf("reverting child window cursor\n"); + } else - glutSetCursor(GLUT_CURSOR_TOP_SIDE); + { + glutSetCursor(GLUT_CURSOR_TOP_SIDE); + printf("changing child window cursor\n"); + } } else { glutSetWindow(nWindow); if (glutGet(GLUT_WINDOW_CURSOR)==GLUT_CURSOR_CYCLE) - glutSetCursor(GLUT_CURSOR_RIGHT_ARROW); + { + glutSetCursor(GLUT_CURSOR_RIGHT_ARROW); + printf("reverting main window cursor\n"); + } else - glutSetCursor(GLUT_CURSOR_CYCLE); + { + glutSetCursor(GLUT_CURSOR_CYCLE); + printf("changing main window cursor\n"); + } } break; @@ -334,7 +346,7 @@ void Timer(int unused) width, height, x ,y, x-border, - y-border-caption); + y-caption); else printf("child window %dx%d, top-left of client at: (%d,%d), relative to parent\n", width, height, @@ -380,4 +392,4 @@ int main(int argc, char* argv[]) printf("glutMainLoop returned\n"); return EXIT_SUCCESS; -} \ No newline at end of file +}