Commit 7f19e125 authored by Karoly Lorentey's avatar Karoly Lorentey
Browse files

Fix initialization of the window-system variable.

lisp/faces.el (x-create-frame-with-faces)
(tty-create-frame-with-faces): Don't set the window-system parameter
here, it seems to be unreliable.

lisp/frame.el (make-frame): Don't forget to return the new frame (d'oh).

src/frame.c (Qwindow_system): New symbol.
(syms_of_frame): Intern it.
(Fmake_terminal_frame): Initialize window-system frame parameter.

src/frame.h (Qwindow_system): New declaration.

src/xfns.c (Fx_create_frame, x_create_tip_frame): Initialize
window-system frame parameter.

parent 30999040
......@@ -1658,7 +1658,7 @@ Value is the new frame created."
(setq parameters (x-handle-named-frame-geometry parameters))
(let ((visibility-spec (assq 'visibility parameters))
(frame-list (frame-list))
(frame (x-create-frame `((window-system . x) (visibility . nil) . ,parameters)))
(frame (x-create-frame `((visibility . nil) . ,parameters)))
......@@ -1744,7 +1744,7 @@ Parameters not specified by PARAMETERS are taken from
`default-frame-alist'. If either PARAMETERS or `default-frame-alist'
contains a `reverse' parameter, handle that. Value is the new frame
(let ((frame (make-terminal-frame `((window-system . nil) . ,parameters)))
(let ((frame (make-terminal-frame parameters))
......@@ -636,7 +636,7 @@ on `after-make-frame-functions' are run with one arg, the newly created frame."
(unless frame-creation-function
(error "Don't know how to create a frame on window system %s" w))
(run-hooks 'before-make-frame-hook)
(funcall frame-creation-function parameters)
(setq frame (funcall frame-creation-function parameters))
(run-hook-with-args 'after-make-frame-functions frame)
......@@ -108,6 +108,7 @@ Lisp_Object Qleft_fringe, Qright_fringe;
Lisp_Object Qbuffer_predicate, Qbuffer_list;
Lisp_Object Qtty_color_mode;
Lisp_Object Qtty, Qtty_type;
Lisp_Object Qwindow_system;
Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth;
......@@ -750,6 +751,7 @@ Note that changing the size of one terminal frame automatically affects all. */
XSETFRAME (frame, f);
Fmodify_frame_parameters (frame, Vdefault_frame_alist);
Fmodify_frame_parameters (frame, parms);
Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil));
/* Make the frame face alist be frame-specific, so that each
frame could change its face definitions independently. */
......@@ -4134,7 +4136,9 @@ syms_of_frame ()
staticpro (&Qtty);
Qtty_type = intern ("tty-type");
staticpro (&Qtty_type);
Qwindow_system = intern ("window-system");
staticpro (&Qwindow_system);
Qface_set_after_frame_default = intern ("face-set-after-frame-default");
staticpro (&Qface_set_after_frame_default);
......@@ -1002,6 +1002,8 @@ extern Lisp_Object Qx_resource_name;
extern Lisp_Object Qleft, Qright, Qtop, Qbox;
extern Lisp_Object Qdisplay;
extern Lisp_Object Qwindow_system;
/* The class of this X application. */
......@@ -3334,6 +3334,8 @@ This function is an internal primitive--use `make-frame' instead. */)
specbind (Qx_resource_name, name);
Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qx), Qnil));
/* Extract the window parameters from the supplied values
that are needed to determine window geometry. */
......@@ -10210,6 +10212,8 @@ x_create_tip_frame (dpyinfo, parms, text)
Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qx), Qnil));
f->no_split = 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment