diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2020-05-18 16:10:35 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2020-05-18 16:10:35 -0700 |
commit | 075aa9f6dabc6783d9e87075d2781b6525e3c95d (patch) | |
tree | 8f782405c64071d608309eeb8d36af1e7d1efd52 | |
parent | 143554b6c4605d1f508a86dd62a8057295af4db2 (diff) |
-rw-r--r-- | XF86Config-parser/Generate.c | 19 | ||||
-rw-r--r-- | XF86Config-parser/xf86Parser.h | 1 | ||||
-rw-r--r-- | make_usable.c | 10 | ||||
-rw-r--r-- | version.mk | 2 |
4 files changed, 25 insertions, 7 deletions
diff --git a/XF86Config-parser/Generate.c b/XF86Config-parser/Generate.c index cdd7054..0947216 100644 --- a/XF86Config-parser/Generate.c +++ b/XF86Config-parser/Generate.c @@ -1322,7 +1322,8 @@ static int get_xserver_information(const char *versionString, int *isModular, int *autoloadsGLX, int *supportsExtensionSection, - int *xineramaPlusCompositeWorks) + int *xineramaPlusCompositeWorks, + const char **compositeExtensionName) { #define XSERVER_VERSION_FORMAT_1 "X Window System Version" #define XSERVER_VERSION_FORMAT_2 "X.Org X Server" @@ -1412,6 +1413,18 @@ static int get_xserver_information(const char *versionString, } else { *xineramaPlusCompositeWorks = TRUE; } + + /* + * With X.Org xserver version 1.20, the name of the composite + * extension was changed from "Composite" to "COMPOSITE". As of + * that release extension names are case-sensitive so we must + * ensure the correct case is used. + */ + if (major == 1 && minor >= 20) { + *compositeExtensionName = "COMPOSITE"; + } else { + *compositeExtensionName = "Composite"; + } return TRUE; @@ -1449,6 +1462,7 @@ void xconfigGetXServerInUse(GenerateOptions *gop) gop->supports_extension_section = FALSE; gop->autoloads_glx = FALSE; gop->xinerama_plus_composite_works = FALSE; + gop->compositeExtensionName = NULL; /* run `X -version` with a PATH that hopefully includes the X binary */ @@ -1479,7 +1493,8 @@ void xconfigGetXServerInUse(GenerateOptions *gop) &dummy, /* isModular */ &gop->autoloads_glx, &gop->supports_extension_section, - &gop->xinerama_plus_composite_works); + &gop->xinerama_plus_composite_works, + &gop->compositeExtensionName); if (found) { if (isXorg) { diff --git a/XF86Config-parser/xf86Parser.h b/XF86Config-parser/xf86Parser.h index 89c1569..131876e 100644 --- a/XF86Config-parser/xf86Parser.h +++ b/XF86Config-parser/xf86Parser.h @@ -625,6 +625,7 @@ typedef struct { int supports_extension_section; int autoloads_glx; int xinerama_plus_composite_works; + const char *compositeExtensionName; } GenerateOptions; diff --git a/make_usable.c b/make_usable.c index 3858b4a..30ef10f 100644 --- a/make_usable.c +++ b/make_usable.c @@ -183,10 +183,11 @@ int update_extensions(Options *op, XConfigPtr config) } /* remove any existing composite extension option */ - - xconfigRemoveNamedOption(&(config->extensions->options), "Composite", + xconfigRemoveNamedOption(&(config->extensions->options), + op->gop.compositeExtensionName, NULL); + /* determine the value to set for the Composite option */ value = GET_BOOL_OPTION(op->boolean_option_values, @@ -194,8 +195,9 @@ int update_extensions(Options *op, XConfigPtr config) "Enable" : "Disable"; /* add the option */ - - xconfigAddNewOption(&config->extensions->options, "Composite", value); + xconfigAddNewOption(&config->extensions->options, + op->gop.compositeExtensionName, + value); } return TRUE; @@ -1 +1 @@ -NVIDIA_VERSION = 340.107 +NVIDIA_VERSION = 340.108 |