Commit 29e7ec5a authored by Peter Hutterer's avatar Peter Hutterer

Switch to using "#if HAVE_XI..." exclusively

Don't mix  "if" and "ifdef"
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 2865729a
......@@ -138,7 +138,7 @@ static int list_xi1(Display *display,
return EXIT_SUCCESS;
}
#ifdef HAVE_XI2
#if HAVE_XI2
/* also used from test_xi2.c */
void
print_classes_xi2(Display* display, XIAnyClassInfo **classes,
......@@ -371,7 +371,7 @@ list(Display *display,
{
if (format == FORMAT_NONE)
format = FORMAT_LONG;
#ifdef HAVE_XI2
#if HAVE_XI2
if (xinput_version(display) == XI_2_Major)
{
XIDeviceInfo *info = xi2_find_device_info(display, argv[arg_dev]);
......@@ -399,7 +399,7 @@ list(Display *display,
} else {
if (format == FORMAT_NONE)
format = FORMAT_SHORT;
#ifdef HAVE_XI2
#if HAVE_XI2
if (xinput_version(display) == XI_2_Major)
return list_xi2(display, format);
#endif
......
......@@ -714,7 +714,7 @@ do_set_prop_xi2(Display *dpy, Atom type, int format, int argc, char **argv, char
int list_props(Display *display, int argc, char *argv[], char *name,
char *desc)
{
#ifdef HAVE_XI2
#if HAVE_XI2
if (xinput_version(display) == XI_2_Major)
return list_props_xi2(display, argc, argv, name, desc);
#endif
......@@ -725,7 +725,7 @@ int list_props(Display *display, int argc, char *argv[], char *name,
int delete_prop(Display *display, int argc, char *argv[], char *name,
char *desc)
{
#ifdef HAVE_XI2
#if HAVE_XI2
if (xinput_version(display) == XI_2_Major)
return delete_prop_xi2(display, argc, argv, name, desc);
#endif
......@@ -736,7 +736,7 @@ int delete_prop(Display *display, int argc, char *argv[], char *name,
static int
do_set_prop(Display *display, Atom type, int format, int argc, char *argv[], char *name, char *desc)
{
#ifdef HAVE_XI2
#if HAVE_XI2
if (xinput_version(display) == XI_2_Major)
return do_set_prop_xi2(display, type, format, argc, argv, name, desc);
#endif
......
......@@ -376,7 +376,7 @@ test_xi2(Display *display,
XISetMask(m->mask, XI_Leave);
XISetMask(m->mask, XI_FocusIn);
XISetMask(m->mask, XI_FocusOut);
#ifdef HAVE_XI22
#if HAVE_XI22
XISetMask(m->mask, XI_TouchBegin);
XISetMask(m->mask, XI_TouchUpdate);
XISetMask(m->mask, XI_TouchEnd);
......@@ -394,7 +394,7 @@ test_xi2(Display *display,
XISetMask(m->mask, XI_RawButtonPress);
XISetMask(m->mask, XI_RawButtonRelease);
XISetMask(m->mask, XI_RawMotion);
#ifdef HAVE_XI22
#if HAVE_XI22
XISetMask(m->mask, XI_RawTouchBegin);
XISetMask(m->mask, XI_RawTouchUpdate);
XISetMask(m->mask, XI_RawTouchEnd);
......
......@@ -273,7 +273,7 @@ find_device_info(Display *display,
return found;
}
#ifdef HAVE_XI2
#if HAVE_XI2
Bool is_pointer(int use)
{
return use == XIMasterPointer || use == XISlavePointer;
......
......@@ -27,7 +27,7 @@
#include <X11/Xlib.h>
#include <X11/extensions/XInput.h>
#ifdef HAVE_XI2
#if HAVE_XI2
#include <X11/extensions/XInput2.h>
#endif
#include <X11/Xutil.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment