Re: Xorg 7.2 and FreeBSD 6.2-p5 VMWARE vmmouse problem

2008-01-09 Thread Bob Finch

On Wed, 2008-01-09 at 19:26 +1100, Sam Lawrance wrote:
 On 09/01/2008, at 10:31 AM, Bob Finch wrote:
 
  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.c2007-09-25  
  16:11:47.0 -0700
  +++ xf86-input-vmmouse-12.4.3/src/vmmouse.c 2008-01-08  
  14:58:59.0 -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);
  }
 
 Oh wow, I owe you a beer!
 
 Any idea why this does not affect everyone using vmware?

The problem only shows up with the vmmouse driver in Xorg 7.3. If
you're using an older version of Xorg or if you're using the
standard mouse driver, you won't see the problem.

It sounds like the next Xorg server release will fix the problem.

http://lists.freedesktop.org/pipermail/xorg/2007-September/028624.html

-- Bob


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Xorg 7.2 and FreeBSD 6.2-p5 VMWARE vmmouse problem

2008-01-08 Thread Bob Finch
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.c2007-09-25 
16:11:47.0 -0700
+++ xf86-input-vmmouse-12.4.3/src/vmmouse.c 2008-01-08 14:58:59.0 
-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


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]