From 02f377d5e2dd18537d0807ad63675a0970b5a37d Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 4 Nov 2011 08:57:20 +0100 Subject: xserver pixman mesa git update 4 nov 2011 --- xorg-server/hw/xfree86/common/xf86Xinput.c | 40 +++++++++--------------------- 1 file changed, 12 insertions(+), 28 deletions(-) (limited to 'xorg-server/hw/xfree86/common/xf86Xinput.c') diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index 425b35957..c3ffc27d0 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -910,35 +910,38 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, return BadAlloc; nt_list_for_each_entry(option, options, list.next) { - if (strcasecmp(input_option_get_key(option), "driver") == 0) { + const char *key = input_option_get_key(option); + const char *value = input_option_get_value(option); + + if (strcasecmp(key, "driver") == 0) { if (pInfo->driver) { rval = BadRequest; goto unwind; } - pInfo->driver = xstrdup(input_option_get_value(option)); + pInfo->driver = xstrdup(value); if (!pInfo->driver) { rval = BadAlloc; goto unwind; } } - if (strcasecmp(input_option_get_key(option), "name") == 0 || - strcasecmp(input_option_get_key(option), "identifier") == 0) { + if (strcasecmp(key, "name") == 0 || + strcasecmp(key, "identifier") == 0) { if (pInfo->name) { rval = BadRequest; goto unwind; } - pInfo->name = xstrdup(input_option_get_value(option)); + pInfo->name = xstrdup(value); if (!pInfo->name) { rval = BadAlloc; goto unwind; } } - if (strcmp(input_option_get_key(option), "_source") == 0 && - (strcmp(input_option_get_value(option), "server/hal") == 0 || - strcmp(input_option_get_value(option), "server/udev") == 0 || - strcmp(input_option_get_value(option), "server/wscons") == 0)) { + if (strcmp(key, "_source") == 0 && + (strcmp(value, "server/hal") == 0 || + strcmp(value, "server/udev") == 0 || + strcmp(value, "server/wscons") == 0)) { is_auto = 1; if (!xf86Info.autoAddDevices) { rval = BadMatch; @@ -1346,25 +1349,6 @@ xf86ScaleAxis(int Cx, return X; } -/* - * This function checks the given screen against the current screen and - * makes changes if appropriate. It should be called from an XInput driver's - * ReadInput function before any events are posted, if the device is screen - * specific like a touch screen. - */ -void -xf86XInputSetScreen(InputInfoPtr pInfo, - int screen_number, - int x, - int y) -{ - if (miPointerGetScreen(pInfo->dev) != - screenInfo.screens[screen_number]) { - miPointerSetScreen(pInfo->dev, screen_number, x, y); - } -} - - Bool xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval, int resolution, int min_res, int max_res, int mode) -- cgit v1.2.3