diff options
author | Keith Packard <keithp@keithp.com> | 2000-10-06 22:05:53 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2000-10-06 22:05:53 +0000 |
commit | 15d45ffbd9af5ccce07264d6182b2222c417a2a5 (patch) | |
tree | 49555a54cacca643f46d94557ff21ee3e287d619 /hw/kdrive/src | |
parent | fae164a4958b95e3ba4e4d5125da4611fcb14f6d (diff) |
kdrive: fix any-edge screen-switching behaviour
Diffstat (limited to 'hw/kdrive/src')
-rw-r--r-- | hw/kdrive/src/kinput.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 0b380c19d..02c3ec5d6 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.5 2000/08/26 00:24:38 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.8 2000/10/06 05:54:09 keithp Exp $ */ #include "kdrive.h" #include "inputstr.h" @@ -1380,7 +1380,10 @@ KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) if (n < 0) n = screenInfo.numScreens - 1; pScreen = screenInfo.screens[n]; - *x += pScreen->width; + if (*x < 0) + *x += pScreen->width; + if (*y < 0) + *y += pScreen->height; *ppScreen = pScreen; return TRUE; } @@ -1389,7 +1392,10 @@ KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) n = pScreen->myNum + 1; if (n >= screenInfo.numScreens) n = 0; - *x -= pScreen->width; + if (*x >= pScreen->width) + *x -= pScreen->width; + if (*y >= pScreen->height) + *y -= pScreen->height; pScreen = screenInfo.screens[n]; *ppScreen = pScreen; return TRUE; |