… | |
… | |
263 | #endif |
263 | #endif |
264 | #ifdef HAVE_AFTERIMAGE |
264 | #ifdef HAVE_AFTERIMAGE |
265 | STRG (Rs_blendtype, "blendType", "blt", "string", "background image blending type - alpha, tint, etc..."), |
265 | STRG (Rs_blendtype, "blendType", "blt", "string", "background image blending type - alpha, tint, etc..."), |
266 | STRG (Rs_blurradius, "blurRadius", "blr", "HxV", "Gaussian Blur radii to apply to the root background"), |
266 | STRG (Rs_blurradius, "blurRadius", "blr", "HxV", "Gaussian Blur radii to apply to the root background"), |
267 | #endif |
267 | #endif |
268 | #ifndef NO_RESOURCES |
|
|
269 | INFO ("xrm", "string", "X resource"), |
|
|
270 | #endif |
|
|
271 | INFO ("e", "command arg ...", "command to execute") |
268 | INFO ("e", "command arg ...", "command to execute") |
272 | }; |
269 | }; |
273 | |
270 | |
274 | #undef INFO |
271 | #undef INFO |
275 | #undef STRG |
272 | #undef STRG |
… | |
… | |
561 | |
558 | |
562 | if (optList[entry].doff != -1) |
559 | if (optList[entry].doff != -1) |
563 | rs[optList[entry].doff] = flag; |
560 | rs[optList[entry].doff] = flag; |
564 | } |
561 | } |
565 | } |
562 | } |
|
|
563 | #ifndef NO_RESOURCES |
|
|
564 | else if (!strcmp (opt, "xrm")) |
|
|
565 | { |
|
|
566 | if (i+1 < argc) |
|
|
567 | XrmPutLineResource (&option_db, argv[++i]); |
|
|
568 | } |
|
|
569 | #endif |
566 | #ifdef KEYSYM_RESOURCE |
570 | #ifdef KEYSYM_RESOURCE |
567 | else if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) |
571 | else if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) |
568 | { |
572 | { |
569 | if (i+1 < argc) |
573 | if (i+1 < argc) |
570 | parse_keysym (opt + sizeof ("keysym.") - 1, argv[++i]); |
574 | { |
|
|
575 | char *res = (char *)malloc (strlen (opt) + strlen (argv[++i]) + 6); |
|
|
576 | sprintf (res, "*.%s: %s\n", opt, argv[i]); |
|
|
577 | XrmPutLineResource (&option_db, res); |
|
|
578 | free (res); |
|
|
579 | } |
571 | } |
580 | } |
572 | #endif |
581 | #endif |
573 | else |
582 | else |
574 | { |
583 | { |
575 | bad_option = 1; |
584 | bad_option = 1; |
… | |
… | |
800 | |
809 | |
801 | void |
810 | void |
802 | rxvt_term::extract_resources () |
811 | rxvt_term::extract_resources () |
803 | { |
812 | { |
804 | #ifndef NO_RESOURCES |
813 | #ifndef NO_RESOURCES |
|
|
814 | XrmDatabase database = XrmGetDatabase (dpy); |
|
|
815 | XrmMergeDatabases (option_db, &database); |
|
|
816 | option_db = NULL; |
805 | /* |
817 | /* |
806 | * Query resources for options that affect us |
818 | * Query resources for options that affect us |
807 | */ |
819 | */ |
808 | for (int entry = 0; entry < optList_size; entry++) |
820 | for (int entry = 0; entry < optList_size; entry++) |
809 | { |
821 | { |
… | |
… | |
838 | |
850 | |
839 | /* |
851 | /* |
840 | * [R5 or later]: enumerate the resource database |
852 | * [R5 or later]: enumerate the resource database |
841 | */ |
853 | */ |
842 | # ifdef KEYSYM_RESOURCE |
854 | # ifdef KEYSYM_RESOURCE |
843 | XrmDatabase database = XrmGetDatabase (dpy); |
|
|
844 | XrmName name_prefix[3]; |
855 | XrmName name_prefix[3]; |
845 | XrmClass class_prefix[3]; |
856 | XrmClass class_prefix[3]; |
846 | |
857 | |
847 | name_prefix[0] = XrmStringToName (rs[Rs_name]); |
858 | name_prefix[0] = XrmStringToName (rs[Rs_name]); |
848 | name_prefix[1] = XrmStringToName ("keysym"); |
859 | name_prefix[1] = XrmStringToName ("keysym"); |