Permalink
Browse files

new glut callback semantics for Win7/X11

  • Loading branch information...
1 parent f83c365 commit 499f7db8b95acf8a92aa3978db238a4c18d8eab1 @floe committed May 9, 2013
Showing with 9 additions and 16 deletions.
  1. +5 −10 libs/simplegl/GLUTWindow.cc
  2. +4 −6 widgets/Mouse.cc
@@ -118,17 +118,12 @@ GLUTWindow::GLUTWindow( int w, int h, const std::string& title, int mode ) {
glutMultiButtonFunc( g_extbutton );
glutMultiMotionFunc( g_extmotion );
glutMultiPassiveFunc( g_extpassive );
- #elif GLUT_HAS_MPX
- glutXExtensionEntryFunc( g_extentry );
- glutXExtensionButtonFunc( g_extbutton );
- glutXExtensionMotionFunc( g_extmotion );
- glutXExtensionPassiveFunc( g_extpassive );
- #else
- glutEntryFunc( g_entry );
- glutMouseFunc( g_mouse );
- glutMotionFunc( g_motion );
- glutPassiveMotionFunc( g_passive );
#endif
+
+ glutEntryFunc( g_entry );
+ glutMouseFunc( g_mouse );
+ glutMotionFunc( g_motion );
+ glutPassiveMotionFunc( g_passive );
}
View
@@ -33,12 +33,10 @@ void Mouse::send_blobs( double w, double h ) {
std::map<int,BasicBlob>::iterator blob = blobs.begin();
- #ifdef _MSC_VER
- // on windows, the first touch point is reported twice
- // (once as mouse pointer with ID -1, once as touch)
- // => skip the very first one
- if (blobs.size() > 1) blob++;
- #endif
+ // first touch point is reported twice by MPX or Win7
+ // (once as mouse pointer with ID -1, once as touch)
+ // => skip the very first one
+ if (blobs.size() > 1) blob++;
for ( ; blob != blobs.end(); blob++) {

0 comments on commit 499f7db

Please sign in to comment.