git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@856
7f0cb862-5218-0410-a997-
914c9d46530a
{\r
spnav_event sev;\r
\r
+ if(spnav_win != fgStructure.CurrentWindow) {\r
+ /* this will also initialize spaceball if needed (first call) */\r
+ fgSpaceballSetWindow(fgStructure.CurrentWindow);\r
+ }\r
+\r
if(!sball_initialized) {\r
- fgInitialiseSpaceball();\r
- if(!sball_initialized) {\r
- return 0;\r
- }\r
+ return 0;\r
}\r
\r
return spnav_x11_event(xev, &sev);\r
window->Window.Handle,
window->Window.Context
);
-
- /* also register this window to receive spaceball events */
- fgSpaceballSetWindow(window);
}
#elif TARGET_HOST_MS_WINDOWS
if( fgStructure.CurrentWindow )