diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-11-25 00:39:52 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-11-25 00:54:47 -0800 |
commit | 13df49dca28cf680a4d104630cd675de25d3e944 (patch) | |
tree | 8b39dce75424301653f901f6934be05943e6ad9e /hw | |
parent | 40187f782beae4ae751824ef511c9f56a80357c7 (diff) |
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 fbf4b0d33fa5dc618c3191a4e823232dfa33cd95)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xquartz/mach-startup/bundle-main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index 058fe7865..fa19eab9a 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -426,6 +426,17 @@ int main(int argc, char **argv, char **envp) { /* Setup the initial crasherporter info */ 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); for(i=0; i < argc; i++) { fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); |