From cad18ec979e38ef80a606f0e4abf2142b9d0d2b1 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Mon, 10 Oct 2005 10:07:47 +0000 Subject: [PATCH] don't move x or y depending on the screen size change --- hw/xfree86/common/xf86RandR.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c index 7beb05469..7d79395a4 100644 --- a/hw/xfree86/common/xf86RandR.c +++ b/hw/xfree86/common/xf86RandR.c @@ -261,10 +261,8 @@ xf86RandRSetConfig (ScreenPtr pScreen, */ if (pScreen == miPointerCurrentScreen ()) { - if (px >= pScreen->width || py >= pScreen->height) { - px = pScreen->width - 1; - py = pScreen->height - 1; - } + px = (px >= pScreen->width ? (pScreen->width - 1) : px); + py = (py >= pScreen->height ? (pScreen->height - 1) : py); xf86SetViewport(pScreen, px, py);