diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-06-07 10:21:18 +1000 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2010-11-11 13:09:25 +0100 |
commit | 48407d86e3be526826c2207886ec304779c93f78 (patch) | |
tree | dc4cac242f86b2c09ddcf89759ec48481ca166eb | |
parent | a6374668bda2cb78736e5f603f048adea1822d08 (diff) |
randr: prevent an unnecessary screen resize with multiple displays
crtc->{x,y} is always 0 when xf86DefaultScreenLimits() is called, so we
calculate too small an area for the initial framebuffer and force a resize
to happen.
This commit fixes the code to use desired{X,Y} instead, which contains the
initial output positions.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit f7af00e9f0e0e1d854b0e882378c032518ab71ca)
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 3fcd79b55..0b077d0ae 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1043,8 +1043,8 @@ xf86DefaultScreenLimits (ScrnInfoPtr scrn, int *widthp, int *heightp, if (crtc->enabled) { - crtc_width = crtc->x + xf86ModeWidth (&crtc->desiredMode, crtc->desiredRotation); - crtc_height = crtc->y + xf86ModeHeight (&crtc->desiredMode, crtc->desiredRotation); + crtc_width = crtc->desiredX + xf86ModeWidth (&crtc->desiredMode, crtc->desiredRotation); + crtc_height = crtc->desiredY + xf86ModeHeight (&crtc->desiredMode, crtc->desiredRotation); } if (!canGrow) { for (o = 0; o < config->num_output; o++) |