XQuartz: Use the environment to pass the bundle's prefs domain on to xinit/quartz-wm for Tiger or no-launchd-LEOPARD
(cherry picked from commit fbf4b0d33f
)
This commit is contained in:
parent
40187f782b
commit
13df49dca2
|
@ -426,6 +426,17 @@ int main(int argc, char **argv, char **envp) {
|
||||||
/* Setup the initial crasherporter info */
|
/* Setup the initial crasherporter info */
|
||||||
strlcpy(__crashreporter_info__, __crashreporter_info__base, __crashreporter_info__len);
|
strlcpy(__crashreporter_info__, __crashreporter_info__base, __crashreporter_info__len);
|
||||||
|
|
||||||
|
/* Pass on our prefs domain to startx and its inheritors (mainly for quartz-wm) */
|
||||||
|
CFBundleRef bundle = CFBundleGetMainBundle();
|
||||||
|
if(bundle) {
|
||||||
|
CFStringRef pd = CFBundleGetIdentifier(bundle);
|
||||||
|
if(pd) {
|
||||||
|
const char *pds = CFStringGetCStringPtr(pd, 0);
|
||||||
|
if(pds)
|
||||||
|
setenv("X11_PREFS_DOMAIN", pds, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
|
fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
|
||||||
for(i=0; i < argc; i++) {
|
for(i=0; i < argc; i++) {
|
||||||
fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
|
fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user