From owner-freebsd-x11@FreeBSD.ORG Wed Oct 17 07:00:01 2012 Return-Path: Delivered-To: freebsd-x11@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B719B816 for ; Wed, 17 Oct 2012 07:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id 9F4CD8FC08 for ; Wed, 17 Oct 2012 07:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9H701AH059423 for ; Wed, 17 Oct 2012 07:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9H7018W059422; Wed, 17 Oct 2012 07:00:01 GMT (envelope-from gnats) Date: Wed, 17 Oct 2012 07:00:01 GMT Message-Id: <201210170700.q9H7018W059422@freefall.freebsd.org> To: freebsd-x11@FreeBSD.org Cc: From: Henry Hu Subject: Re: ports/171433: x11/xorg: xorg hal: mouse input devices psm0 and usm0 not correctly recognized (" No Device specified, looking for one" ) X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Henry Hu List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 07:00:01 -0000 The following reply was made to PR ports/171433; it has been noted by GNATS. From: Henry Hu To: bug-followup@freebsd.org, Martin.Birgmeier@aon.at Cc: Subject: Re: ports/171433: x11/xorg: xorg hal: mouse input devices psm0 and usm0 not correctly recognized ("No Device specified, looking for one") Date: Wed, 17 Oct 2012 02:55:13 -0400 --e89a8ff1cb2cd097c804cc3bc19d Content-Type: text/plain; charset=ISO-8859-1 I've made a patch and it seems to solve this problem. This patch goes to x11-drivers/xf86-input-mouse. It changes src/mouse.c. I've attached the patch. It seems like that the hal configuration module correctly added the "Device" option, in config/hal.c in xorg-server. The xorg-server copied it into the IDevRec struct's commonOptions field, in NewInputDeviceRequest() in hw/xfree86/common/xf86Xinput.c Later, this struct is passed into xf86NewInputDevice(), and then passed into mouse driver's MousePreInit(). However, there is a problem here. If the ABI version is old, MousePreInit() calls NewMousePreInit(), and copied some info from IDevPtr into InputInfoPtr, which is passed into NewMousePreInit(). But it does not copy the commonOptions field. So the options, including the "Device" option, is lost. This patch just copies IDevPtr.commonOptions into InputInfoPtr.options, and then it works. -- Cheers, Henry --e89a8ff1cb2cd097c804cc3bc19d Content-Type: application/octet-stream; name=patch-mouse-option Content-Disposition: attachment; filename=patch-mouse-option Content-Transfer-Encoding: base64 X-Attachment-Id: f_h8e2um130 LS0tIHNyYy9tb3VzZS5jLm9yaWcJMjAxMS0wNi0yNSAwMToyNjo0Ny4wMDAwMDAwMDAgLTA0MDAK KysrIHNyYy9tb3VzZS5jCTIwMTItMTAtMTcgMDI6Mzk6NDIuMDAwMDAwMDAwIC0wNDAwCkBAIC04 NzEsNiArODcxLDcgQEAKICAgICBwSW5mby0+Y2xvc2VfcHJvYyA9IE5VTEw7CiAgICAgcEluZm8t PnByaXZhdGVfZmxhZ3MgPSAwOwogICAgIHBJbmZvLT5hbHdheXNfY29yZV9mZWVkYmFjayA9IE5V TEw7CisgICAgcEluZm8tPm9wdGlvbnMgPSBkZXYtPmNvbW1vbk9wdGlvbnM7CgogICAgIGlmIChO ZXdNb3VzZVByZUluaXQoZHJ2LCBwSW5mbywgZmxhZ3MpID09IFN1Y2Nlc3MpCiAgICAgewo= --e89a8ff1cb2cd097c804cc3bc19d--