@@ -43,7 +43,7 @@ OF SUCH DAMAGE.
4343/* default socket path */
4444#define SPNAV_SOCK_PATH "/var/run/spnav.sock"
4545
46- #ifdef USE_X11
46+ #ifdef SPNAV_USE_X11
4747#include <X11/Xlib.h>
4848#include <X11/Xutil.h>
4949
@@ -166,7 +166,7 @@ int spnav_open(void)
166166 return 0 ;
167167}
168168
169- #ifdef USE_X11
169+ #ifdef SPNAV_USE_X11
170170int spnav_x11_open (Display * display , Window win )
171171{
172172 if (IS_OPEN ) {
@@ -213,7 +213,7 @@ int spnav_close(void)
213213 return 0 ;
214214 }
215215
216- #ifdef USE_X11
216+ #ifdef SPNAV_USE_X11
217217 if (dpy ) {
218218 spnav_x11_window (DefaultRootWindow (dpy ));
219219 app_win = 0 ;
@@ -226,7 +226,7 @@ int spnav_close(void)
226226}
227227
228228
229- #ifdef USE_X11
229+ #ifdef SPNAV_USE_X11
230230int spnav_x11_window (Window win )
231231{
232232 int (* prev_xerr_handler )(Display * , XErrorEvent * );
@@ -299,7 +299,7 @@ int spnav_sensitivity(double sens)
299299{
300300 struct reqresp rr ;
301301
302- #ifdef USE_X11
302+ #ifdef SPNAV_USE_X11
303303 if (dpy ) {
304304 return x11_sensitivity (sens );
305305 }
@@ -328,7 +328,7 @@ int spnav_sensitivity(double sens)
328328
329329int spnav_fd (void )
330330{
331- #ifdef USE_X11
331+ #ifdef SPNAV_USE_X11
332332 if (dpy ) {
333333 return ConnectionNumber (dpy );
334334 }
@@ -462,7 +462,7 @@ static int proc_event(int32_t *data, spnav_event *event)
462462
463463int spnav_wait_event (spnav_event * event )
464464{
465- #ifdef USE_X11
465+ #ifdef SPNAV_USE_X11
466466 if (dpy ) {
467467 for (;;) {
468468 XEvent xev ;
@@ -485,7 +485,7 @@ int spnav_wait_event(spnav_event *event)
485485
486486int spnav_poll_event (spnav_event * event )
487487{
488- #ifdef USE_X11
488+ #ifdef SPNAV_USE_X11
489489 if (dpy ) {
490490 if (XPending (dpy )) {
491491 XEvent xev ;
@@ -507,7 +507,7 @@ int spnav_poll_event(spnav_event *event)
507507 return 0 ;
508508}
509509
510- #ifdef USE_X11
510+ #ifdef SPNAV_USE_X11
511511static Bool match_events (Display * dpy , XEvent * xev , char * arg )
512512{
513513 int evtype = * (int * )arg ;
@@ -554,7 +554,7 @@ int spnav_remove_events(int type)
554554{
555555 int rm_count = 0 ;
556556
557- #ifdef USE_X11
557+ #ifdef SPNAV_USE_X11
558558 if (dpy ) {
559559 XEvent xev ;
560560
@@ -604,7 +604,7 @@ int spnav_remove_events(int type)
604604 return 0 ;
605605}
606606
607- #ifdef USE_X11
607+ #ifdef SPNAV_USE_X11
608608int spnav_x11_event (const XEvent * xev , spnav_event * event )
609609{
610610 int i ;
0 commit comments