On 02/26/2012 04:18 PM, Peter Hutterer wrote:
master->last.valuators[] is in desktop dimensions, so use those as
rescale axis ranges, not the screen. Otherwise, a rescale on any screen
not the top-left will cause out-of-bounds coordinates which will always
map to the bottom-right screen, causing the device to be stuck on that
screen.

X.Org Bug 46657<http://bugs.freedesktop.org/show_bug.cgi?id=46657>

Signed-off-by: Peter Hutterer<peter.hutte...@who-t.net>
---
  dix/getevents.c |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dix/getevents.c b/dix/getevents.c
index 306d0ff..11c509c 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -341,14 +341,16 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr 
pDev)
          pDev->last.valuators[0] = rescaleValuatorAxis(pDev->last.valuators[0],
                                                        NULL,
                                                        pDev->valuator->axes + 
0,
-                                                      0, scr->width);
+                                                      screenInfo.x,
+                                                      screenInfo.width);
      }
      if(pDev->valuator->numAxes>  1)
      {
          pDev->last.valuators[1] = rescaleValuatorAxis(pDev->last.valuators[1],
                                                        NULL,
                                                        pDev->valuator->axes + 
1,
-                                                      0, scr->height);
+                                                      screenInfo.y,
+                                                      screenInfo.height);
      }

      /* calculate the other axis as well based on info from the old

Seems right to me.

Reviewed-by: Chase Douglas <chase.doug...@canonical.com>
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to