From owner-freebsd-questions@FreeBSD.ORG Wed Jan 9 00:06:17 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04A8A16A418 for ; Wed, 9 Jan 2008 00:06:17 +0000 (UTC) (envelope-from bob@nas.com) Received: from smtp-bounce2.openaccess.org (smtp-bounce2.openaccess.org [66.114.32.174]) by mx1.freebsd.org (Postfix) with ESMTP id E2C5513C469 for ; Wed, 9 Jan 2008 00:06:16 +0000 (UTC) (envelope-from bob@nas.com) Received: from edoras.nas.com (mail-nas.openaccess.org [66.114.32.166]) by smtp-bounce2.openaccess.org (Postfix) with ESMTP id A515E7EE73D; Tue, 8 Jan 2008 15:32:21 -0800 (PST) Received: from localhost (edoras [66.114.32.166]) by edoras.nas.com (Postfix) with ESMTP id 9CCA866C85D; Tue, 8 Jan 2008 15:32:21 -0800 (PST) Received: from edoras.nas.com ([66.114.32.166]) by localhost (edoras.nas.com [66.114.32.166]) (amavisd-maia, port 10024) with ESMTP id 67968-15; Tue, 8 Jan 2008 15:32:21 -0800 (PST) Received: from [140.160.13.144] (acd013-144.admcs.wwu.edu [140.160.13.144]) (Authenticated sender: bob@edoras.nas.com) by edoras.nas.com (Postfix) with ESMTP id F309966C85B; Tue, 8 Jan 2008 15:32:20 -0800 (PST) From: Bob Finch To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=windows-1251 Date: Tue, 08 Jan 2008 15:31:24 -0800 Message-Id: <1199835084.952.18.camel@polaris.admcs.wwu.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.2 Cc: boris@brooknet.com.au Subject: Re: Xorg 7.2 and FreeBSD 6.2-p5 VMWARE vmmouse problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2008 00:06:17 -0000 On 10/10/2007, at 17:00:22, Sam Lawrance wrote: >On 10/07/2007, at 11:53 AM, Webster, Andrew wrote: >> Howdy, >> >> >> >> I was successfully able to get Xorg upgraded to 7.2 by just >> installing them from scratch as opposed to trying to upgrading an >> existing system, BUT I’ve run into a problem… >> >> >> >> While running VMWare Server 1.0.3 with FreeBSD 6.2-p5 and Xorg 7.2, >> the mouse pointer behaves very oddly. >> >> The pointer appears in the wrong place on the screen for where the >> system actually thinks that it is. >> >> I’m using the vmmouse driver part of the Xorg system, as the >> regular mouse driver doesn’t appear to work at all, unless some >> settings are amiss. >> >> I really like the vmmouse drive because you can move the pointer in/ >> out of the window as you do with regular windows guest OSes. >> >> >> >> Has anyone experienced similar problems and/ or know of a fix for >> this? >> > >Andrew, > >I just set up VMWare Fusion with FreeBSD and have a problem that >might be related. Ascii art time: >_____________ >|_| | >| | >| | >|___________| > >The pointer appears normally on the screen. However, clicking around >the screen does not work except in a small area in the top left >corner. Moving the mouse within this tiny corner seems to scale up >and operate on the entire screen. Eg. if I click and drag across the >tiny corner, I can see the selection appear across the entire desktop. > >Is this similar to your issue? Did you find a resolution? Sam, I ran into this problem on FreeBSD 7.0 RC1 with Xorg 7.3 using the VMWare mouse driver (vmmouse). Apparently, X server 1.4.0 in Xorg 7.3 no longer calls the conversion_proc function in the mouse driver. The VMWare mouse driver depends on that call to scale the mouse coordiates to the screen size. As a workaround, I fetched the x11-drivers/xf86-input-vmmouse port and patched src/vmmouse.c by hand before installing it: bob polaris[9]: diff -u orig/xf86-input-vmmouse-12.4.3/src/vmmouse.c xf86-input-vmmouse-12.4.3/src/vmmouse.c --- orig/xf86-input-vmmouse-12.4.3/src/vmmouse.c 2007-09-25 16:11:47.000000000 -0700 +++ xf86-input-vmmouse-12.4.3/src/vmmouse.c 2008-01-08 14:58:59.000000000 -0800 @@ -964,8 +964,11 @@ VMMOUSE_INPUT_DATA vmmouseInput; int ps2Buttons = 0; int numPackets; + VMMousePrivPtr mPriv; + double factorX, factorY; pMse = pInfo->private; + mPriv = pMse->mousePriv; while((numPackets = VMMouseClient_GetInput(&vmmouseInput))){ if (numPackets == VMMOUSE_ERROR) { VMMouseClient_Disable(); @@ -990,6 +993,13 @@ dy = vmmouseInput.Y; dz = (char)vmmouseInput.Z; dw = 0; + + /* X server 1.4.0 does not call VMMouseConvertProc() so we scale coordinates here */ + factorX = ((double) screenInfo.screens[mPriv->screenNum]->width) / (double) 65535; + factorY = ((double) screenInfo.screens[mPriv->screenNum]->height) / (double) 65535; + dx = dx * factorX + 0.5; + dy = dy * factorY + 0.5; + /* post an event */ pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw); } -- Bob