projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Uploading spaceball/set-window patch per e-mail from John Tsiombikas dated 1:34 PM...
[freeglut]
/
src
/
freeglut_spaceball.c
diff --git
a/src/freeglut_spaceball.c
b/src/freeglut_spaceball.c
index
a36008e
..
a2e70ed
100644
(file)
--- a/
src/freeglut_spaceball.c
+++ b/
src/freeglut_spaceball.c
@@
-143,11
+143,13
@@
int fgIsSpaceballXEvent(const XEvent *xev)
{
\r
spnav_event sev;
\r
\r
{
\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
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
}
\r
\r
return spnav_x11_event(xev, &sev);
\r
@@
-215,7
+217,10
@@
OF SUCH DAMAGE.
#include <stdio.h>
\r
#include <stdlib.h>
\r
#include <string.h>
\r
#include <stdio.h>
\r
#include <stdlib.h>
\r
#include <string.h>
\r
+
\r
+#if HAVE_ERRNO_H
\r
#include <errno.h>
\r
#include <errno.h>
\r
+#endif
\r
\r
#include <X11/Xlib.h>
\r
#include <X11/Xutil.h>
\r
\r
#include <X11/Xlib.h>
\r
#include <X11/Xutil.h>
\r