diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-26 16:34:14 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-26 16:34:14 +0000 |
commit | 07f0773b3c007857efd87f09618e2283841815f0 (patch) | |
tree | 095ff4fdb7b82541a4460af010c9718d6726bc87 /app/xsetpointer | |
parent | 76ed3d4eeb81a340f0617bf07bc9f22f4b357f5f (diff) |
Revert to xsetpointer 1.0.0.
Diffstat (limited to 'app/xsetpointer')
-rw-r--r-- | app/xsetpointer/configure.ac | 4 | ||||
-rw-r--r-- | app/xsetpointer/xsetpointer.c | 56 | ||||
-rw-r--r-- | app/xsetpointer/xsetpointer.man | 4 |
3 files changed, 13 insertions, 51 deletions
diff --git a/app/xsetpointer/configure.ac b/app/xsetpointer/configure.ac index ec41f321f..b5dbe3b47 100644 --- a/app/xsetpointer/configure.ac +++ b/app/xsetpointer/configure.ac @@ -22,7 +22,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) -AC_INIT(xsetpointer,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xsetpointer) +AC_INIT(xsetpointer,[1.0.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xsetpointer) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE @@ -32,7 +32,7 @@ AC_PROG_CC AC_PROG_INSTALL # Checks for pkg-config packages -PKG_CHECK_MODULES(XSETPOINTER, xi x11 [inputproto >= 1.4]) +PKG_CHECK_MODULES(XSETPOINTER, xi x11) AC_SUBST(XSETPOINTER_CFLAGS) AC_SUBST(XSETPOINTER_LIBS) diff --git a/app/xsetpointer/xsetpointer.c b/app/xsetpointer/xsetpointer.c index 25a115d52..a3b69cc96 100644 --- a/app/xsetpointer/xsetpointer.c +++ b/app/xsetpointer/xsetpointer.c @@ -59,28 +59,20 @@ StrCaseCmp(char *s1, char *s2) int main(int argc, char * argv[]) { - int loop, num_extensions, num_devices; - char **extensions; - XDeviceInfo *devices; - XDeviceCoreControl corectl; - Display *dpy; - int list = 0, core = 0; - XDevice *device; + int loop, num_extensions, num_devices; + char **extensions; + XDeviceInfo *devices; + Display *dpy; + int list = 0; - if (argc < 2 || argc > 3) { - fprintf(stderr, "usage : %s (-l | -c | +c ) <device name>)\n", argv[0]); + if (argc != 2) { + fprintf(stderr, "usage : %s (-l | <device name>)\n", argv[0]); exit(1); } if (strcmp(argv[1], "-l") == 0) { list = 1; } - else if (strcmp(argv[1], "-c") == 0) { - core = 1; - } - else if (strcmp(argv[1], "+c") == 0) { - core = 2; - } dpy = XOpenDisplay(NULL); @@ -114,45 +106,18 @@ main(int argc, char * argv[]) case IsXExtensionDevice: printf("XExtensionDevice]\n"); break; - case IsXExtensionKeyboard: - printf("XExtensionKeyboard]\n"); - break; - case IsXExtensionPointer: - printf("XExtensionPointer]\n"); - break; default: printf("invalid value]\n"); break; } } - else if (core) { - if (argc == 3 && devices[loop].name && - StrCaseCmp(devices[loop].name, argv[2]) == 0) { -#ifdef DEBUG - fprintf(stderr, "opening device %s at %d\n", - devices[loop].name ? devices[loop].name : "<noname>", - devices[loop].id); -#endif - device = XOpenDevice(dpy, devices[loop].id); - if (device) { - corectl.status = (core - 1); - corectl.length = sizeof(corectl); - corectl.control = DEVICE_CORE; - XChangeDeviceControl(dpy, device, DEVICE_CORE, - (XDeviceControl *)&corectl); - exit(0); - } - else { - fprintf(stderr, "error opening device\n"); - exit(1); - } - } - } else { if ((argc == 2) && devices[loop].name && (StrCaseCmp(devices[loop].name, argv[1]) == 0)) if (devices[loop].use == IsXExtensionDevice) { + XDevice *device; + #ifdef DEBUG fprintf(stderr, "opening device %s\n", devices[loop].name ? devices[loop].name : "<noname>"); @@ -183,8 +148,7 @@ main(int argc, char * argv[]) exit(0); } else { - fprintf(stderr, "Extended device %s not found\n", core ? argv[2] : - argv[1]); + fprintf(stderr, "Extended device %s not found\n", argv[1]); exit(1); } } diff --git a/app/xsetpointer/xsetpointer.man b/app/xsetpointer/xsetpointer.man index c75666fcd..0d90beb66 100644 --- a/app/xsetpointer/xsetpointer.man +++ b/app/xsetpointer/xsetpointer.man @@ -10,8 +10,6 @@ xsetpointer \- set an X Input device as the main pointer .I device-name .SH DESCRIPTION Xsetpointer sets an XInput device as the main pointer. When called with -the \-l flag it lists the available devices. When called with the -c/+c -flag, it toggles the sending of core input events, for servers which -implement a virtual core pointer; -c disables core events, and +c enables. +the \-l flag it lists the available devices. .SH AUTHOR Frederic Lepied |