Commit bf7bea5d authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix bug #14739 with creation of GUI frames from TTY session on Windows.

 src/w32fns.c (Fx_create_frame): Error out if called from a TTY
 session.

 lisp/frame.el (window-system-for-display): Don't allow to create a
 GUI frame from a -nw session on MS-Windows.
parent efe70219
2013-12-28 Eli Zaretskii <eliz@gnu.org>
* frame.el (window-system-for-display): Don't allow to create a
GUI frame from a -nw session on MS-Windows. (Bug#14739)
2013-12-28 Glenn Morris <rgm@gnu.org> 2013-12-28 Glenn Morris <rgm@gnu.org>
* mail/hashcash.el (hashcash-program): Rename from hashcash-path. * mail/hashcash.el (hashcash-program): Rename from hashcash-path.
......
...@@ -540,10 +540,14 @@ is not considered (see `next-frame')." ...@@ -540,10 +540,14 @@ is not considered (see `next-frame')."
(defun window-system-for-display (display) (defun window-system-for-display (display)
"Return the window system for DISPLAY. "Return the window system for DISPLAY.
Return nil if we don't know how to interpret DISPLAY." Return nil if we don't know how to interpret DISPLAY."
(cl-loop for descriptor in display-format-alist ;; MS-Windows doesn't know how to create a GUI frame in a -nw session.
for pattern = (car descriptor) (if (and (eq system-type 'windows-nt)
for system = (cdr descriptor) (null (window-system)))
when (string-match-p pattern display) return system)) nil
(cl-loop for descriptor in display-format-alist
for pattern = (car descriptor)
for system = (cdr descriptor)
when (string-match-p pattern display) return system)))
(defun make-frame-on-display (display &optional parameters) (defun make-frame-on-display (display &optional parameters)
"Make a frame on display DISPLAY. "Make a frame on display DISPLAY.
......
2013-12-28 Eli Zaretskii <eliz@gnu.org>
* w32fns.c (Fx_create_frame): Error out if called from a TTY
session. (Bug#14739)
2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl> 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
* callproc.c (Vexec_path): Document that exec-directory is in it. * callproc.c (Vexec_path): Document that exec-directory is in it.
......
...@@ -4346,6 +4346,9 @@ This function is an internal primitive--use `make-frame' instead. */) ...@@ -4346,6 +4346,9 @@ This function is an internal primitive--use `make-frame' instead. */)
Lisp_Object parent; Lisp_Object parent;
struct kboard *kb; struct kboard *kb;
if (!FRAME_W32_P (SELECTED_FRAME ()))
error ("Cannot create a GUI frame in a -nw session");
/* Make copy of frame parameters because the original is in pure /* Make copy of frame parameters because the original is in pure
storage now. */ storage now. */
parameters = Fcopy_alist (parameters); parameters = Fcopy_alist (parameters);
......
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