From: Diederick Niehorster Date: Wed, 14 Jun 2017 20:51:14 +0000 (+0000) Subject: resizer demo: adding a bit more output to console to indicate what is going on upon... X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=freeglut;a=commitdiff_plain;h=3cb75b2e5c19ab250a5dfd0ca7da0fe7355269ec resizer demo: adding a bit more output to console to indicate what is going on upon keypress (cherry picked from commit f04be0c4f22d380e3493b81a6781539e3731b431) git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1805 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/progs/demos/Resizer/Resizer.cpp b/progs/demos/Resizer/Resizer.cpp index f56d826..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;