Uploading spaceball/set-window patch per e-mail from John Tsiombikas dated 1:34 PM, 12/2/09
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@856 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
e5e1e7df6c
commit
51c968449c
@ -143,12 +143,14 @@ int fgIsSpaceballXEvent(const XEvent *xev)
|
|||||||
{
|
{
|
||||||
spnav_event sev;
|
spnav_event sev;
|
||||||
|
|
||||||
if(!sball_initialized) {
|
if(spnav_win != fgStructure.CurrentWindow) {
|
||||||
fgInitialiseSpaceball();
|
/* this will also initialize spaceball if needed (first call) */
|
||||||
|
fgSpaceballSetWindow(fgStructure.CurrentWindow);
|
||||||
|
}
|
||||||
|
|
||||||
if(!sball_initialized) {
|
if(!sball_initialized) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return spnav_x11_event(xev, &sev);
|
return spnav_x11_event(xev, &sev);
|
||||||
}
|
}
|
||||||
|
@ -600,9 +600,6 @@ void fgSetWindow ( SFG_Window *window )
|
|||||||
window->Window.Handle,
|
window->Window.Handle,
|
||||||
window->Window.Context
|
window->Window.Context
|
||||||
);
|
);
|
||||||
|
|
||||||
/* also register this window to receive spaceball events */
|
|
||||||
fgSpaceballSetWindow(window);
|
|
||||||
}
|
}
|
||||||
#elif TARGET_HOST_MS_WINDOWS
|
#elif TARGET_HOST_MS_WINDOWS
|
||||||
if( fgStructure.CurrentWindow )
|
if( fgStructure.CurrentWindow )
|
||||||
|
Reference in New Issue
Block a user