]>
Commit | Line | Data |
---|---|---|
313ed234 SS |
1 | From f22b6f8a5899f125de63738e69aaddc2dd0a5d0a Mon Sep 17 00:00:00 2001 |
2 | From: Ben Skeggs <bskeggs@redhat.com> | |
3 | Date: Mon, 7 Jun 2010 10:10:10 +1000 | |
4 | Subject: [PATCH] randr: prevent an unnecessary screen resize with multiple displays | |
5 | ||
6 | crtc->{x,y} is always 0 when xf86DefaultScreenLimits() is called, so we | |
7 | calculate too small an area for the initial framebuffer and force a resize | |
8 | to happen. | |
9 | ||
10 | This commit fixes the code to use desired{X,Y} instead, which contains the | |
11 | initial output positions. | |
12 | ||
13 | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> | |
14 | --- | |
15 | hw/xfree86/modes/xf86Crtc.c | 4 ++-- | |
16 | 1 files changed, 2 insertions(+), 2 deletions(-) | |
17 | ||
18 | diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c | |
19 | index 51e7b5a..c2ad7bc 100644 | |
20 | --- a/hw/xfree86/modes/xf86Crtc.c | |
21 | +++ b/hw/xfree86/modes/xf86Crtc.c | |
22 | @@ -1041,8 +1041,8 @@ xf86DefaultScreenLimits (ScrnInfoPtr scrn, int *widthp, int *heightp, | |
23 | ||
24 | if (crtc->enabled) | |
25 | { | |
26 | - crtc_width = crtc->x + xf86ModeWidth (&crtc->desiredMode, crtc->desiredRotation); | |
27 | - crtc_height = crtc->y + xf86ModeHeight (&crtc->desiredMode, crtc->desiredRotation); | |
28 | + crtc_width = crtc->desiredX + xf86ModeWidth (&crtc->desiredMode, crtc->desiredRotation); | |
29 | + crtc_height = crtc->desiredY + xf86ModeHeight (&crtc->desiredMode, crtc->desiredRotation); | |
30 | } | |
31 | if (!canGrow) { | |
32 | for (o = 0; o < config->num_output; o++) | |
33 | -- | |
34 | 1.6.6 | |
35 |