aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-04 09:28:39 +0100
committermarha <marha@users.sourceforge.net>2011-11-04 09:28:39 +0100
commit23e2767dc3e6b8891d4b55b711c70c6bc85a6f85 (patch)
tree04c538697c3afbd401afb1bb614460b16be28844 /xorg-server/randr
parent125500b44d0253d7fd7a59905ab730151d4f66e2 (diff)
parent02f377d5e2dd18537d0807ad63675a0970b5a37d (diff)
downloadvcxsrv-23e2767dc3e6b8891d4b55b711c70c6bc85a6f85.tar.gz
vcxsrv-23e2767dc3e6b8891d4b55b711c70c6bc85a6f85.tar.bz2
vcxsrv-23e2767dc3e6b8891d4b55b711c70c6bc85a6f85.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h xorg-server/hw/xwin/InitOutput.c xorg-server/hw/xwin/ddraw.h xorg-server/hw/xwin/winclipboardwndproc.c xorg-server/hw/xwin/winglobals.c xorg-server/hw/xwin/winmonitors.c xorg-server/hw/xwin/winprocarg.c xorg-server/hw/xwin/winwin32rootlesswndproc.c xorg-server/include/scrnintstr.h xorg-server/xkb/ddxList.c xorg-server/xkb/ddxLoad.c
Diffstat (limited to 'xorg-server/randr')
-rw-r--r--xorg-server/randr/rrcrtc.c29
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;
}