summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86RandR.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2005-10-10 10:07:47 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2005-10-10 10:07:47 +0000
commitcad18ec979e38ef80a606f0e4abf2142b9d0d2b1 (patch)
tree2605697da3d35c4a6fa910b1935e130c8362782d /hw/xfree86/common/xf86RandR.c
parent7f72f94aa4f0655b8aab6c67eef2a5f5ac4b418f (diff)
don't move x or y depending on the screen size change
Diffstat (limited to 'hw/xfree86/common/xf86RandR.c')
-rw-r--r--hw/xfree86/common/xf86RandR.c6
1 files 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);