changed the USE_X11 macro to SPNAV_USE_X11

pull/15/head
John Tsiombikas 2022-04-01 05:54:47 +03:00
rodzic f0af601c29
commit c280310bbf
3 zmienionych plików z 14 dodań i 14 usunięć

2
configure vendored
Wyświetl plik

@ -116,7 +116,7 @@ echo '#ifndef SPNAV_CONFIG_H_' >src/spnav_config.h
echo '#define SPNAV_CONFIG_H_' >>src/spnav_config.h echo '#define SPNAV_CONFIG_H_' >>src/spnav_config.h
echo '' >>src/spnav_config.h echo '' >>src/spnav_config.h
if [ "$X11" = 'yes' ]; then if [ "$X11" = 'yes' ]; then
echo '#define USE_X11' >>src/spnav_config.h echo '#define SPNAV_USE_X11' >>src/spnav_config.h
echo '' >>src/spnav_config.h echo '' >>src/spnav_config.h
fi fi
echo '#endif /* SPNAV_CONFIG_H_ */' >>src/spnav_config.h echo '#endif /* SPNAV_CONFIG_H_ */' >>src/spnav_config.h

Wyświetl plik

@ -43,7 +43,7 @@ OF SUCH DAMAGE.
/* default socket path */ /* default socket path */
#define SPNAV_SOCK_PATH "/var/run/spnav.sock" #define SPNAV_SOCK_PATH "/var/run/spnav.sock"
#ifdef USE_X11 #ifdef SPNAV_USE_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
@ -166,7 +166,7 @@ success:
return 0; return 0;
} }
#ifdef USE_X11 #ifdef SPNAV_USE_X11
int spnav_x11_open(Display *display, Window win) int spnav_x11_open(Display *display, Window win)
{ {
if(IS_OPEN) { if(IS_OPEN) {
@ -213,7 +213,7 @@ int spnav_close(void)
return 0; return 0;
} }
#ifdef USE_X11 #ifdef SPNAV_USE_X11
if(dpy) { if(dpy) {
spnav_x11_window(DefaultRootWindow(dpy)); spnav_x11_window(DefaultRootWindow(dpy));
app_win = 0; app_win = 0;
@ -226,7 +226,7 @@ int spnav_close(void)
} }
#ifdef USE_X11 #ifdef SPNAV_USE_X11
int spnav_x11_window(Window win) int spnav_x11_window(Window win)
{ {
int (*prev_xerr_handler)(Display*, XErrorEvent*); int (*prev_xerr_handler)(Display*, XErrorEvent*);
@ -299,7 +299,7 @@ int spnav_sensitivity(double sens)
{ {
struct reqresp rr; struct reqresp rr;
#ifdef USE_X11 #ifdef SPNAV_USE_X11
if(dpy) { if(dpy) {
return x11_sensitivity(sens); return x11_sensitivity(sens);
} }
@ -328,7 +328,7 @@ int spnav_sensitivity(double sens)
int spnav_fd(void) int spnav_fd(void)
{ {
#ifdef USE_X11 #ifdef SPNAV_USE_X11
if(dpy) { if(dpy) {
return ConnectionNumber(dpy); return ConnectionNumber(dpy);
} }
@ -462,7 +462,7 @@ static int proc_event(int32_t *data, spnav_event *event)
int spnav_wait_event(spnav_event *event) int spnav_wait_event(spnav_event *event)
{ {
#ifdef USE_X11 #ifdef SPNAV_USE_X11
if(dpy) { if(dpy) {
for(;;) { for(;;) {
XEvent xev; XEvent xev;
@ -485,7 +485,7 @@ int spnav_wait_event(spnav_event *event)
int spnav_poll_event(spnav_event *event) int spnav_poll_event(spnav_event *event)
{ {
#ifdef USE_X11 #ifdef SPNAV_USE_X11
if(dpy) { if(dpy) {
if(XPending(dpy)) { if(XPending(dpy)) {
XEvent xev; XEvent xev;
@ -507,7 +507,7 @@ int spnav_poll_event(spnav_event *event)
return 0; return 0;
} }
#ifdef USE_X11 #ifdef SPNAV_USE_X11
static Bool match_events(Display *dpy, XEvent *xev, char *arg) static Bool match_events(Display *dpy, XEvent *xev, char *arg)
{ {
int evtype = *(int*)arg; int evtype = *(int*)arg;
@ -554,7 +554,7 @@ int spnav_remove_events(int type)
{ {
int rm_count = 0; int rm_count = 0;
#ifdef USE_X11 #ifdef SPNAV_USE_X11
if(dpy) { if(dpy) {
XEvent xev; XEvent xev;
@ -604,7 +604,7 @@ int spnav_remove_events(int type)
return 0; return 0;
} }
#ifdef USE_X11 #ifdef SPNAV_USE_X11
int spnav_x11_event(const XEvent *xev, spnav_event *event) int spnav_x11_event(const XEvent *xev, spnav_event *event)
{ {
int i; int i;

Wyświetl plik

@ -29,7 +29,7 @@ OF SUCH DAMAGE.
#include <spnav_config.h> #include <spnav_config.h>
#ifdef USE_X11 #ifdef SPNAV_USE_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#endif #endif
@ -137,7 +137,7 @@ int spnav_remove_events(int type);
#ifdef USE_X11 #ifdef SPNAV_USE_X11
/* Opens a connection to the daemon, using the original magellan X11 protocol. /* Opens a connection to the daemon, using the original magellan X11 protocol.
* Any application using this protocol should be compatible with the proprietary * Any application using this protocol should be compatible with the proprietary
* 3D connexion driver too. * 3D connexion driver too.