From: Richard Rauch Date: Fri, 7 Nov 2003 10:26:37 +0000 (+0000) Subject: Combined EnterNotify and LeaveNotify event processing in the UNIX_X11 X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;ds=sidebyside;h=58d16ae0b8baad8cadb1b5d83a39bce0d34af417;p=freeglut Combined EnterNotify and LeaveNotify event processing in the UNIX_X11 event loop. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@319 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/freeglut_main.c b/src/freeglut_main.c index 803d4d2..fb8f9bb 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -619,20 +619,13 @@ void FGAPIENTRY glutMainLoopEvent( void ) break; case EnterNotify: - { - GETWINDOW( xcrossing ); - GETMOUSE( xcrossing ); - INVOKE_WCB( *window, Entry, ( GLUT_ENTERED ) ); - } - break; - /* XXX Combine EnterNotify and LeaveNotify */ case LeaveNotify: - { GETWINDOW( xcrossing ); GETMOUSE( xcrossing ); - INVOKE_WCB( *window, Entry, ( GLUT_LEFT ) ); - } - break; + INVOKE_WCB( *window, Entry, ( ( EnterNotify == event.type ) ? + GLUT_ENTERED : + GLUT_LEFT ) ); + break; case MotionNotify: {