Skip to content

Commit c280310

Browse files
committed
changed the USE_X11 macro to SPNAV_USE_X11
1 parent f0af601 commit c280310

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ echo '#ifndef SPNAV_CONFIG_H_' >src/spnav_config.h
116116
echo '#define SPNAV_CONFIG_H_' >>src/spnav_config.h
117117
echo '' >>src/spnav_config.h
118118
if [ "$X11" = 'yes' ]; then
119-
echo '#define USE_X11' >>src/spnav_config.h
119+
echo '#define SPNAV_USE_X11' >>src/spnav_config.h
120120
echo '' >>src/spnav_config.h
121121
fi
122122
echo '#endif /* SPNAV_CONFIG_H_ */' >>src/spnav_config.h

src/spnav.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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
170170
int 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
230230
int 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

329329
int 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

463463
int 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

486486
int 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
511511
static 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
608608
int spnav_x11_event(const XEvent *xev, spnav_event *event)
609609
{
610610
int i;

src/spnav.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ OF SUCH DAMAGE.
2929

3030
#include <spnav_config.h>
3131

32-
#ifdef USE_X11
32+
#ifdef SPNAV_USE_X11
3333
#include <X11/Xlib.h>
3434
#endif
3535

@@ -137,7 +137,7 @@ int spnav_remove_events(int type);
137137

138138

139139

140-
#ifdef USE_X11
140+
#ifdef SPNAV_USE_X11
141141
/* Opens a connection to the daemon, using the original magellan X11 protocol.
142142
* Any application using this protocol should be compatible with the proprietary
143143
* 3D connexion driver too.

0 commit comments

Comments
 (0)