- }
-
- xassert (ac <= sizeof av / sizeof *av);
-
- if (ac)
- {
- struct x_resources res;
-
- XtSetValues (widget, av, ac);
- res.av = av, res.ac = ac;
- XtApplyToWidgets (widget, xm_apply_resources, &res);
- if (fl)
- XmFontListFree (fl);
- }
-}
-
-
-#endif /* USE_MOTIF */
-
-#ifdef USE_LUCID
-
-static void xl_apply_resources P_ ((Widget, XtPointer));
-static void xl_set_menu_resources_from_menu_face P_ ((struct frame *, Widget));
-
-
-/* Set widget W's resources from P which points to an x_resources
- structure. */
-
-static void
-xl_apply_resources (widget, p)
- Widget widget;
- XtPointer p;
-{
- struct x_resources *res = (struct x_resources *) p;
- XtSetValues (widget, res->av, res->ac);
-}
-
-
-/* On frame F, set X resources of menu-widget WIDGET from face `menu'.
- This is the Lucid version. */
-
-static void
-xl_set_menu_resources_from_menu_face (f, widget)
- struct frame *f;
- Widget widget;
-{
- struct face *face;
- Lisp_Object lface;
- Arg av[3];
- int ac = 0;
-
- lface = lface_from_face_name (f, Qmenu, 1);
- face = FACE_FROM_ID (f, MENU_FACE_ID);
-
- if (!UNSPECIFIEDP (LFACE_FOREGROUND (lface)))
- {
- XtSetArg (av[ac], XtNforeground, face->foreground);
- ++ac;
- }
-
- if (!UNSPECIFIEDP (LFACE_BACKGROUND (lface)))
- {
- XtSetArg (av[ac], XtNbackground, face->background);
- ++ac;
- }
-
- if (face->font
- && (!UNSPECIFIEDP (LFACE_FAMILY (lface))
- || !UNSPECIFIEDP (LFACE_SWIDTH (lface))
- || !UNSPECIFIEDP (LFACE_WEIGHT (lface))
- || !UNSPECIFIEDP (LFACE_SLANT (lface))
- || !UNSPECIFIEDP (LFACE_HEIGHT (lface))))
- {
- XtSetArg (av[ac], XtNfont, face->font);
- ++ac;
- }
-
- if (ac)
- {
- struct x_resources res;
-
- XtSetValues (widget, av, ac);
-
- /* We must do children here in case we're handling a pop-up menu
- in which case WIDGET is a popup shell. XtApplyToWidgets
- is a function from lwlib. */
- res.av = av, res.ac = ac;
- XtApplyToWidgets (widget, xl_apply_resources, &res);
- }
-}
-
-#endif /* USE_LUCID */
-
-
-/* On frame F, set X resources of menu-widget WIDGET from face `menu'. */
-
-void
-x_set_menu_resources_from_menu_face (f, widget)
- struct frame *f;
- Widget widget;
-{
- /* Realized faces may have been removed on frame F, e.g. because of
- face attribute changes. Recompute them, if necessary, since we
- will need the `menu' face. */
- if (f->face_cache->used == 0)
- recompute_basic_faces (f);
+
+ if (STRINGP (LFACE_FOREGROUND (lface)))
+ {
+ sprintf (line, "%s.%s*foreground: %s",
+ myname, popup_path,
+ XSTRING (LFACE_FOREGROUND (lface))->data);
+ XrmPutLineResource (&rdb, line);
+ sprintf (line, "%s.pane.menubar*foreground: %s",
+ myname, XSTRING (LFACE_FOREGROUND (lface))->data);
+ XrmPutLineResource (&rdb, line);
+ changed_p = 1;
+ }