From 6389405b56d2221d8a7b80c4bb3bd3b4e1a29bab Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 22 Mar 2010 09:20:49 +1000 Subject: [PATCH 1/6] configure: Always define XINPUT. This define was removed in e251c9e75afdc "Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac". Drivers that support multiple server versions and still check for ifdef XINPUT now always build without XINPUT support if they're calling XORG_DRIVER_CHECK_EXT(XINPUT, inputproto). Signed-off-by: Peter Hutterer Reviewed-by: Dan Nicholson --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index d379b3af5..92c34ab7a 100644 --- a/configure.ac +++ b/configure.ac @@ -1122,6 +1122,7 @@ MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' # XINPUT extension is integral part of the server +AC_DEFINE(XINPUT, 1, [Support X Input extension]) XI_LIB='$(top_builddir)/Xi/libXi.la' XI_INC='-I$(top_srcdir)/Xi' From 0ecfab89d1754b0b7e32b3964b40663d1810cd62 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 22 Mar 2010 14:04:09 +1000 Subject: [PATCH 2/6] xfree86: remove if 1 from the dawn of time. 7+ years for an if 1 should be enough to just admit that there's no other option. Signed-off-by: Peter Hutterer Reviewed-by: Fernando Carrijo Reviewed-by: Corbin Simpson --- hw/xfree86/os-support/shared/posix_tty.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c index bf1bb03a3..4ba8599ab 100644 --- a/hw/xfree86/os-support/shared/posix_tty.c +++ b/hw/xfree86/os-support/shared/posix_tty.c @@ -137,19 +137,9 @@ xf86OpenSerial (pointer options) if (!isatty (fd)) { -#if 1 /* Allow non-tty devices to be opened. */ xfree(dev); return (fd); -#else - xf86Msg (X_WARNING, - "xf86OpenSerial: Specified device %s is not a tty\n", - dev); - SYSCALL (close (fd)); - errno = EINVAL; - xfree(dev); - return (-1); -#endif } /* set up default port parameters */ From 8311cd5f89ca6781842bb24671b8122cdf8be148 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 23 Mar 2010 10:37:36 -0700 Subject: [PATCH 3/6] XKB: Fix garbage initialization XkbEnableDisableControls set extra garbage bits on the xkbControlsNotify changedControls mask because it was uninitialized on the stack. Found by clang Signed-off-by: Jeremy Huddleston Signed-off-by: Peter Hutterer --- xkb/xkbUtils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 5b317c977..e28799759 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -753,7 +753,7 @@ XkbSrvLedInfoPtr sli; if (cause!=NULL) { xkbControlsNotify cn; cn.numGroups= ctrls->num_groups; - cn.changedControls|= XkbControlsEnabledMask; + cn.changedControls= XkbControlsEnabledMask; cn.enabledControls= ctrls->enabled_ctrls; cn.enabledControlChanges= (ctrls->enabled_ctrls^old); cn.keycode= cause->kc; From 70bd02f2ea3a91c0340df97ca3b8a4f9400f6f46 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 23 Mar 2010 12:13:56 +1000 Subject: [PATCH 4/6] xfree86: merge driver from the input class into the options. A driver that is assigned by an input class is only present as idev->driver. The driver itself has no access to this information once PreInit is called. For devices that rely on chain-hotplugging (wacom), this means that for the second device the driver information is lost and the second device cannot be initialized through NewInputDeviceRequest. Although this could be worked around by hardcoding the driver name in the wacom driver, having the assigned driver in the options seems like the better solution. This issue only manifests itself with the udev backend. With HAL, the driver is assigned by HAL and the option is duplicated in config/hal.c. Signed-off-by: Peter Hutterer Reviewed-by: Dan Nicholson --- hw/xfree86/common/xf86Xinput.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index e9f7f2fb7..822922717 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -618,6 +618,7 @@ MergeInputClasses(IDevPtr idev, InputAttributes *attrs) "InputClass configuration"); return BadAlloc; } + mergedopts = xf86ReplaceStrOption(mergedopts, "driver", idev->driver); } idev->commonOptions = xf86optionListMerge(idev->commonOptions, mergedopts); From d00c3298a698ddddc8967215cef7dd941fa15804 Mon Sep 17 00:00:00 2001 From: Fernando Carrijo Date: Wed, 24 Mar 2010 20:11:34 -0300 Subject: [PATCH 5/6] Cleanup some comments in SpriteRec Signed-off-by: Fernando Carrijo Signed-off-by: Peter Hutterer --- include/inputstr.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/inputstr.h b/include/inputstr.h index 15184d071..de4026cb7 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -386,8 +386,16 @@ typedef struct { int spriteTraceSize; int spriteTraceGood; - ScreenPtr pEnqueueScreen; /* screen events are being delivered to */ - ScreenPtr pDequeueScreen; /* screen events are being dispatched to */ + /* Due to delays between event generation and event processing, it is + * possible that the pointer has crossed screen boundaries between the + * time in which it begins generating events and the time when + * those events are processed. + * + * pEnqueueScreen: screen the pointer was on when the event was generated + * pDequeueScreen: screen the pointer was on when the event is processed + */ + ScreenPtr pEnqueueScreen; + ScreenPtr pDequeueScreen; } SpriteRec, *SpritePtr; From aa91508356f243edc3b11795b1481edcfe0d39c2 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 24 Mar 2010 23:18:35 -0700 Subject: [PATCH 6/6] config/udev: Prefer product name from attribute rather than uevent The input device product name for evdev devices in the kernel uevent has embedded quotes that aren't expected here. Use the sysfs name attribute instead, which does not suffer this problem. The uevent name will be used as a fallback if no name attribute is found. Signed-off-by: Dan Nicholson Signed-off-by: Peter Hutterer --- config/udev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/udev.c b/config/udev.c index 69257e935..452fb5a8d 100644 --- a/config/udev.c +++ b/config/udev.c @@ -73,8 +73,11 @@ device_added(struct udev_device *udev_device) goto unwind; parent = udev_device_get_parent(udev_device); - if (parent) - name = udev_device_get_property_value(parent, "NAME"); + if (parent) { + name = udev_device_get_sysattr_value(parent, "name"); + if (!name) + name = udev_device_get_property_value(parent, "NAME"); + } if (!name) name = "(unnamed)"; else