a133a7b192
- xserver-1.3.0-randr-preferred-mode-fix.patch: Fix infinite loop on X startup when a mode is requested in the config file. (#318731) - Fix License tag.
34 lines
983 B
Diff
34 lines
983 B
Diff
diff -up xorg-server-1.3.0.0/hw/xfree86/modes/xf86Crtc.c.jx xorg-server-1.3.0.0/hw/xfree86/modes/xf86Crtc.c
|
|
--- xorg-server-1.3.0.0/hw/xfree86/modes/xf86Crtc.c.jx 2007-10-03 13:10:28.000000000 -0400
|
|
+++ xorg-server-1.3.0.0/hw/xfree86/modes/xf86Crtc.c 2007-10-05 09:58:11.000000000 -0400
|
|
@@ -1420,6 +1420,9 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn,
|
|
{
|
|
if (!strcmp (preferred_mode, mode->name))
|
|
{
|
|
+ DisplayModePtr m;
|
|
+
|
|
+ /* Sort it to the front of the list */
|
|
if (mode != output->probed_modes)
|
|
{
|
|
if (mode->prev)
|
|
@@ -1431,10 +1434,17 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn,
|
|
mode->prev = NULL;
|
|
output->probed_modes = mode;
|
|
}
|
|
+
|
|
+ /* Mark it preferred */
|
|
mode->type |= M_T_PREFERRED;
|
|
+
|
|
+ /* And unprefer everything else */
|
|
+ for (m = output->probed_modes; m; m = m->next)
|
|
+ if (m != mode)
|
|
+ m->type &= ~M_T_PREFERRED;
|
|
+
|
|
+ break;
|
|
}
|
|
- else
|
|
- mode->type &= ~M_T_PREFERRED;
|
|
}
|
|
}
|
|
|