From 4ad33929e0f640dbc91004857ed2168006d21a71 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 26 Feb 2009 16:09:17 +1000 Subject: [PATCH] Rip HAVE_XI2 conditional functionality out. XI2 needs to be harder separated now. --- src/list.c | 41 ----------------------------------------- src/xinput.c | 4 ---- 2 files changed, 45 deletions(-) diff --git a/src/list.c b/src/list.c index de8aca7..3d40987 100644 --- a/src/list.c +++ b/src/list.c @@ -34,9 +34,6 @@ print_info(XDeviceInfo *info, Bool shortformat) XButtonInfoPtr b; XValuatorInfoPtr v; XAxisInfoPtr a; -#if HAVE_XI2 - XAttachInfoPtr att; -#endif printf("\"%s\"\tid=%ld\t[", info->name, info->id); @@ -95,12 +92,6 @@ print_info(XDeviceInfo *info, Bool shortformat) printf ("\t\tResolution is %d\n", a->resolution); } break; -#if HAVE_XI2 - case AttachClass: - att = (XAttachInfoPtr)any; - printf("\tAttached to %d\n", att->attached); - break; -#endif default: printf ("unknown class\n"); } @@ -126,44 +117,12 @@ list(Display *display, if (argc == 0 || shortformat || daemon) { int num_devices; - XEvent ev; - -#if HAVE_XI2 - if (daemon) - { - XiSelectEvent(display, DefaultRootWindow(display), NULL, - XI_DeviceHierarchyChangedMask | - XI_DeviceClassesChangedMask); - } -#endif do { info = XListInputDevices(display, &num_devices); for(loop=0; loopevtype == XI_DeviceHierarchyChangedNotify) - { - printf("Hierarchy change.\n"); - } else if (gev->evtype == XI_DeviceClassesChangedNotify) - { - printf("Device classes changed.\n"); - free(((XDeviceClassesChangedEvent*)&ev)->inputclassinfo); - } - break; - } - } -#endif } while(daemon); } else { int ret = EXIT_SUCCESS; diff --git a/src/xinput.c b/src/xinput.c index 1ee8bbf..082175a 100644 --- a/src/xinput.c +++ b/src/xinput.c @@ -141,11 +141,7 @@ is_xinput_present(Display *display) XExtensionVersion *version; Bool present; -#if HAVE_XI2 - version = XQueryInputVersion(display, XI_2_Major, XI_2_Minor); -#else version = XGetExtensionVersion(display, INAME); -#endif if (version && (version != (XExtensionVersion*) NoSuchExtension)) { present = version->present; -- 2.56.0