xserver: Branch 'server-1.5-branch' - 3 commits
Adam Jackson
ajax at kemper.freedesktop.org
Mon Mar 3 12:52:55 PST 2008
hw/xfree86/modes/xf86Crtc.c | 20 ++++++++++++++++++--
hw/xfree86/modes/xf86EdidModes.c | 6 ++++--
hw/xnest/Events.c | 4 ++--
3 files changed, 24 insertions(+), 6 deletions(-)
New commits:
commit 5d2946655bb1c0da8559bb3f969b5037dcdc3918
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Mar 3 15:49:48 2008 -0500
RANDR 1.2: Inherit PreferredMode from the global configuration, if any.
If you don't do this, then Modes "800x600" in the Display subsection will
be dutifully ignored and the driver will start at whatever resolution it
feels like.
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 266e081..14b6049 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1261,6 +1261,23 @@ xf86SortModes (DisplayModePtr input)
return output;
}
+static char *
+preferredMode(ScrnInfoPtr pScrn, xf86OutputPtr output)
+{
+ char *preferred_mode = NULL;
+
+ /* Check for a configured preference for a particular mode */
+ preferred_mode = xf86GetOptValString (output->options,
+ OPTION_PREFERRED_MODE);
+ if (preferred_mode)
+ return preferred_mode;
+
+ if (pScrn->display->modes && *pScrn->display->modes)
+ preferred_mode = *pScrn->display->modes;
+
+ return preferred_mode;
+}
+
_X_EXPORT void
xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
{
@@ -1445,8 +1462,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
output->probed_modes = xf86SortModes (output->probed_modes);
/* Check for a configured preference for a particular mode */
- preferred_mode = xf86GetOptValString (output->options,
- OPTION_PREFERRED_MODE);
+ preferred_mode = preferredMode(scrn, output);
if (preferred_mode)
{
commit 28c156e2ba15922604984670dab9081ac4e3ce12
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Mar 3 15:45:17 2008 -0500
Fix Motif menu drawing in Xnest.
See also Red Hat bug #229350, OpenSolaris bug #6366490.
diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index 38fefa7..0735354 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -88,7 +88,7 @@ xnestCollectExposures(void)
while (XCheckIfEvent(xnestDisplay, &X, xnestExposurePredicate, NULL)) {
pWin = xnestWindowPtr(X.xexpose.window);
- if (pWin) {
+ if (pWin && X.xexpose.width && X.xexpose.height) {
Box.x1 = pWin->drawable.x + wBorderWidth(pWin) + X.xexpose.x;
Box.y1 = pWin->drawable.y + wBorderWidth(pWin) + X.xexpose.y;
Box.x2 = Box.x1 + X.xexpose.width;
@@ -96,7 +96,7 @@ xnestCollectExposures(void)
REGION_INIT(pWin->drawable.pScreen, &Rgn, &Box, 1);
- miWindowExposures(pWin, &Rgn, NullRegion);
+ miSendExposures(pWin, &Rgn, Box.x2, Box.y2);
}
}
}
commit 71037ebfb426eb9657cbcd3de37ce28d5da34600
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Mar 3 15:43:22 2008 -0500
xf86DDCMonitorSet: Honor the DisplaySize from the config file.
We honor sync ranges and pixel clock settings from the config here, no
reason to ignore DisplaySize.
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index a9d6722..ea36d0a 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -662,8 +662,10 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
Monitor->DDC = DDC;
- Monitor->widthmm = 10 * DDC->features.hsize;
- Monitor->heightmm = 10 * DDC->features.vsize;
+ if (Monitor->widthmm <= 0 && Monitor->heightmm <= 0) {
+ Monitor->widthmm = 10 * DDC->features.hsize;
+ Monitor->heightmm = 10 * DDC->features.vsize;
+ }
/*
* If this is a digital display, then we can use reduced blanking.
More information about the xorg-commit
mailing list