From 5adca344b2f95cf2f2b2b3fabf6c99c39b64f25f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 3 Jul 2013 21:45:11 +0100 Subject: [PATCH] sna: Fix configuration user overrides on xorg-server < 1.14.99.1 Marty Jack found that the enums for the user overrides were off by one (his xorg conf was no longer being applied). This is because I had missed the introduction of ZoomModes in 1.14.99 increasing all the important enum values by one. Reported-by: Marty Jack Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index de27a365..ecc8f7e6 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -2928,10 +2928,16 @@ static bool sna_probe_initial_configuration(struct sna *sna) { ScrnInfoPtr scrn = sna->scrn; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); - const int user_overrides[] = { + const int user_overrides[] = { /* XXX fugly! */ +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,1,0) 2, 3, 4, 5, 6, /* position */ 11, /* rotate */ 12, /* panning */ +#else + 1, 2, 3, 4, 5, /* position */ + 10, /* rotate */ + 11, /* panning */ +#endif }; int width, height; int i, j;