projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding a multitouch patch from Eero Pajarre per e-mail dated 6/8/2011 1:14 AM
[freeglut]
/
src
/
freeglut_spaceball.c
diff --git
a/src/freeglut_spaceball.c
b/src/freeglut_spaceball.c
index
154e52d
..
7c9d073
100644
(file)
--- a/
src/freeglut_spaceball.c
+++ b/
src/freeglut_spaceball.c
@@
-10,6
+10,8
@@
#include <GL/freeglut.h>
\r
#include "freeglut_internal.h"
\r
\r
#include <GL/freeglut.h>
\r
#include "freeglut_internal.h"
\r
\r
+/* -- PRIVATE FUNCTIONS --------------------------------------------------- */
\r
+
\r
#if TARGET_HOST_POSIX_X11
\r
#include <X11/Xlib.h>
\r
\r
#if TARGET_HOST_POSIX_X11
\r
#include <X11/Xlib.h>
\r
\r
@@
-143,11
+145,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
@@
-216,7
+220,7
@@
OF SUCH DAMAGE.
#include <stdlib.h>
\r
#include <string.h>
\r
\r
#include <stdlib.h>
\r
#include <string.h>
\r
\r
-#if HAVE_ERRNO_H
\r
+#ifdef HAVE_ERRNO_H
\r
#include <errno.h>
\r
#endif
\r
\r
#include <errno.h>
\r
#endif
\r
\r