diff options
author | marha <marha@users.sourceforge.net> | 2011-11-04 08:57:20 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-04 08:57:20 +0100 |
commit | 02f377d5e2dd18537d0807ad63675a0970b5a37d (patch) | |
tree | 1814c826db4d95a30ad71431d9c84b8d2611ec18 /xorg-server/randr | |
parent | 6f4feafd4d22beaabfb0202e66b0dea9047ee084 (diff) | |
download | vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.gz vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.bz2 vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.zip |
xserver pixman mesa git update 4 nov 2011
Diffstat (limited to 'xorg-server/randr')
-rw-r--r-- | xorg-server/randr/rrcrtc.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c index e6a38ae60..13dd7da7c 100644 --- a/xorg-server/randr/rrcrtc.c +++ b/xorg-server/randr/rrcrtc.c @@ -1459,7 +1459,7 @@ RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x, crtc_bounds(crtc, &left, &right, &top, &bottom); - if ((*x >= left) && (*x <= right) && (*y >= top) && (*y <= bottom)) + if ((*x >= left) && (*x < right) && (*y >= top) && (*y < bottom)) return; } @@ -1475,24 +1475,15 @@ RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x, crtc_bounds(crtc, &left, &right, &top, &bottom); miPointerGetPosition(pDev, &nx, &ny); - if ((nx >= left) && (nx <= right) && (ny >= top) && (ny <= bottom)) { - if ((*x <= left) || (*x >= right)) { - int dx = *x - nx; - - if (dx > 0) - *x = right; - else if (dx < 0) - *x = left; - } - - if ((*y <= top) || (*y >= bottom)) { - int dy = *y - ny; - - if (dy > 0) - *y = bottom; - else if (dy < 0) - *y = top; - } + if ((nx >= left) && (nx < right) && (ny >= top) && (ny < bottom)) { + if (*x < left) + *x = left; + if (*x >= right) + *x = right - 1; + if (*y < top) + *y = top; + if (*y >= bottom) + *y = bottom - 1; return; } |