Lisp_Object Qvisible;
Lisp_Object Qdisplay_type;
Lisp_Object Qbackground_mode;
-Lisp_Object Qinhibit_default_face_x_resources;
Lisp_Object Qx_frame_parameter;
Lisp_Object Qx_resource_name;
/* Install the chosen minibuffer window, with proper buffer. */
f->minibuffer_window = val;
}
+
+ return Qnil;
}
DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0,
{
FRAME_PTR f;
register Lisp_Object tail, prop, val;
- int count = SPECPDL_INDEX ();
-
- /* Bind this to t to inhibit initialization of the default face from
- X resources in face-set-after-frame-default. If we don't inhibit
- this, modifying the `font' frame parameter, for example, while
- there is a `default.attributeFont' X resource, won't work,
- because `default's font is reset to the value of the X resource
- and that resets the `font' frame parameter. */
- specbind (Qinhibit_default_face_x_resources, Qt);
if (EQ (frame, Qnil))
frame = selected_frame;
call1 (Qframe_set_background_mode, frame);
}
}
-
- return unbind_to (count, Qnil);
}
DEFUN ("frame-with-environment", Fframe_with_environment, Sframe_with_environment, 0, 1, 0,
struct frame *f;
Lisp_Object new_value, old_value;
{
+ Lisp_Object bgcolor;
+
if (NILP (new_value))
f->gamma = 0;
else if (NUMBERP (new_value) && XFLOATINT (new_value) > 0)
else
signal_error ("Invalid screen-gamma", new_value);
- clear_face_cache (0);
+ /* Apply the new gamma value to the frame background. */
+ bgcolor = Fassq (Qbackground_color, f->param_alist);
+ if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor)))
+ {
+ Lisp_Object index = Fget (Qbackground_color, Qx_frame_parameter);
+ if (NATNUMP (index)
+ && (XFASTINT (index)
+ < sizeof (frame_parms)/sizeof (frame_parms[0]))
+ && rif->frame_parm_handlers[XFASTINT (index)])
+ (*(rif->frame_parm_handlers[XFASTINT (index)]))
+ (f, bgcolor, Qnil);
+ }
+
+ Fclear_face_cache (Qnil);
}
Vdefault_frame_scroll_bars = Qnil;
#endif
- Qinhibit_default_face_x_resources
- = intern ("inhibit-default-face-x-resources");
- staticpro (&Qinhibit_default_face_x_resources);
-
DEFVAR_LISP ("terminal-frame", &Vterminal_frame,
doc: /* The initial frame-object, which represents Emacs's stdout. */);