emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115796: Fix bug #14739 with creation of GUI frames


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r115796: Fix bug #14739 with creation of GUI frames from TTY session on Windows.
Date: Sat, 28 Dec 2013 11:48:43 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115796
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14739
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2013-12-28 13:47:26 +0200
message:
  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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/frame.el                  frame.el-20091113204419-o5vbwnq5f7feedwu-275
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/w32fns.c                   w32fns.c-20091113204419-o5vbwnq5f7feedwu-945
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-12-28 08:21:33 +0000
+++ b/lisp/ChangeLog    2013-12-28 11:47:26 +0000
@@ -1,3 +1,8 @@
+2013-12-28  Eli Zaretskii  <address@hidden>
+
+       * 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  <address@hidden>
 
        * mail/hashcash.el (hashcash-program): Rename from hashcash-path.

=== modified file 'lisp/frame.el'
--- a/lisp/frame.el     2013-11-30 09:25:31 +0000
+++ b/lisp/frame.el     2013-12-28 11:47:26 +0000
@@ -540,10 +540,14 @@
 (defun window-system-for-display (display)
   "Return the window system for DISPLAY.
 Return nil if we don't know how to interpret DISPLAY."
-  (cl-loop for descriptor in display-format-alist
-           for pattern = (car descriptor)
-           for system = (cdr descriptor)
-           when (string-match-p pattern display) return system))
+  ;; MS-Windows doesn't know how to create a GUI frame in a -nw session.
+  (if (and (eq system-type 'windows-nt)
+          (null (window-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)
   "Make a frame on display DISPLAY.

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-12-28 02:17:54 +0000
+++ b/src/ChangeLog     2013-12-28 11:47:26 +0000
@@ -1,3 +1,8 @@
+2013-12-28  Eli Zaretskii  <address@hidden>
+
+       * w32fns.c (Fx_create_frame): Error out if called from a TTY
+       session.  (Bug#14739)
+
 2013-12-27  Jarek Czekalski  <address@hidden>
 
        * callproc.c (Vexec_path): Document that exec-directory is in it.

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2013-12-26 11:31:42 +0000
+++ b/src/w32fns.c      2013-12-28 11:47:26 +0000
@@ -4346,6 +4346,9 @@
   Lisp_Object parent;
   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
      storage now. */
   parameters = Fcopy_alist (parameters);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]