--- rxvt-unicode/src/xdefaults.C 2007/11/22 12:31:49 1.121 +++ rxvt-unicode/src/xdefaults.C 2007/11/23 11:17:37 1.123 @@ -265,9 +265,6 @@ STRG (Rs_blendtype, "blendType", "blt", "string", "background image blending type - alpha, tint, etc..."), STRG (Rs_blurradius, "blurRadius", "blr", "HxV", "Gaussian Blur radii to apply to the root background"), #endif -#ifndef NO_RESOURCES - INFO ("xrm", "string", "X resource"), -#endif INFO ("e", "command arg ...", "command to execute") }; @@ -563,11 +560,23 @@ rs[optList[entry].doff] = flag; } } +#ifndef NO_RESOURCES + else if (!strcmp (opt, "xrm")) + { + if (i+1 < argc) + XrmPutLineResource (&option_db, argv[++i]); + } +#endif #ifdef KEYSYM_RESOURCE else if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) { if (i+1 < argc) - parse_keysym (opt + sizeof ("keysym.") - 1, argv[++i]); + { + char *res = (char *)malloc (strlen (opt) + strlen (argv[++i]) + 6); + sprintf (res, "*.%s: %s\n", opt, argv[i]); + XrmPutLineResource (&option_db, res); + free (res); + } } #endif else @@ -802,6 +811,9 @@ rxvt_term::extract_resources () { #ifndef NO_RESOURCES + XrmDatabase database = XrmGetDatabase (dpy); + XrmMergeDatabases (option_db, &database); + option_db = NULL; /* * Query resources for options that affect us */ @@ -840,7 +852,6 @@ * [R5 or later]: enumerate the resource database */ # ifdef KEYSYM_RESOURCE - XrmDatabase database = XrmGetDatabase (dpy); XrmName name_prefix[3]; XrmClass class_prefix[3];