summaryrefslogtreecommitdiff
path: root/xserver
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-12-29 10:47:38 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-12-29 10:47:38 +0000
commite312e2e5630e3ebb398e852965d57a44187b99d1 (patch)
treeff63f48be2c580953c23d6c487d6973e6aa74ca1 /xserver
parent026a675e691c0f4e36f40843fdb2ac3ffd2bdf71 (diff)
Revert stuff from my local tree which leaked in xserver 1.11.3 update.
Diffstat (limited to 'xserver')
-rw-r--r--xserver/config/wscons.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/xserver/config/wscons.c b/xserver/config/wscons.c
index b89b9d1ea..0dfc613ec 100644
--- a/xserver/config/wscons.c
+++ b/xserver/config/wscons.c
@@ -29,7 +29,6 @@
#include <dev/wscons/wsksymdef.h>
#include <sys/ioctl.h>
-#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
@@ -122,7 +121,7 @@ wscons_add_keyboard(void)
LogMessage(X_INFO, "config/wscons: checking input device %s\n",
WSCONS_KBD_DEVICE);
- add_option(&options, "name", "Keyboard");
+ add_option(&options, "name", WSCONS_KBD_DEVICE);
add_option(&options, "driver", "kbd");
config_info = Xprintf("wscons:%s", WSCONS_KBD_DEVICE);
@@ -183,13 +182,12 @@ unwind:
}
static void
-wscons_add_pointer(const char *path, const char *driver, int flags, int index)
+wscons_add_pointer(const char *path, const char *driver, int flags)
{
InputAttributes attrs = {};
DeviceIntPtr dev = NULL;
InputOption *options = NULL, *tmpo;
char *config_info = NULL;
- char *name = NULL;
int rc;
config_info = Xprintf("wscons:%s", path);
@@ -199,21 +197,11 @@ wscons_add_pointer(const char *path, const char *driver, int flags, int index)
if (!options)
return;
- if (index >= 0)
- name = Xprintf("%s%d", driver, index);
- else
- name = strdup("mouse");
- if (!name) {
- free(options);
- free(config_info);
- return;
- }
- name[0] = toupper(name[0]);
options->key = strdup("_source");
options->value = strdup("server/wscons");
if (!options->key || !options->value)
return;
- add_option(&options, "name", name);
+ add_option(&options, "name", strdup(path));
add_option(&options, "driver", strdup(driver));
add_option(&options, "device", strdup(path));
LogMessage(X_INFO, "config/wscons: checking input device %s\n", path);
@@ -263,17 +251,17 @@ wscons_add_pointers(void)
case WSMOUSE_TYPE_SYNAPTICS:
case WSMOUSE_TYPE_ALPS:
wscons_add_pointer(devname, "synaptics",
- ATTR_TOUCHPAD, i);
+ ATTR_TOUCHPAD);
break;
case WSMOUSE_TYPE_TPANEL:
- wscons_add_pointer(devname, "ws", ATTR_TOUCHSCREEN, i);
+ wscons_add_pointer(devname, "ws", ATTR_TOUCHSCREEN);
break;
default:
break;
}
}
/* Add a default entry catching all other mux elements as "mouse" */
- wscons_add_pointer(WSCONS_MOUSE_PREFIX, "ws", ATTR_POINTER, -1);
+ wscons_add_pointer(WSCONS_MOUSE_PREFIX, "mouse", ATTR_POINTER);
}
int