emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/frame.el,v


From: Adrian Robert
Subject: [Emacs-diffs] Changes to emacs/lisp/frame.el,v
Date: Tue, 15 Jul 2008 18:15:28 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Adrian Robert <arobert> 08/07/15 18:15:19

Index: lisp/frame.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/frame.el,v
retrieving revision 1.272
retrieving revision 1.273
diff -u -b -r1.272 -r1.273
--- lisp/frame.el       12 Jun 2008 03:56:16 -0000      1.272
+++ lisp/frame.el       15 Jul 2008 18:15:00 -0000      1.273
@@ -610,12 +610,19 @@
   "Make a frame on X display DISPLAY.
 The optional second argument PARAMETERS specifies additional frame parameters."
   (interactive "sMake frame on display: ")
+  (if (featurep 'ns-windowing)
+      (progn
+       (when (and (boundp 'ns-initialized) (not ns-initialized))
+         (setq ns-display-name display)
+         (ns-initialize-window-system))
+       (make-frame `((window-system . ns) (display . ,display) . ,parameters)))
+    (progn
   (or (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" display)
       (error "Invalid display, not HOST:SERVER or HOST:SERVER.SCREEN"))
   (when (and (boundp 'x-initialized) (not x-initialized))
     (setq x-display-name display)
     (x-initialize-window-system))
-  (make-frame `((window-system . x) (display . ,display) . ,parameters)))
+      (make-frame `((window-system . x) (display . ,display) . ,parameters)))))
 
 (defun make-frame-on-tty (tty type &optional parameters)
   "Make a frame on terminal device TTY.
@@ -835,7 +842,7 @@
     (select-frame frame)
     (raise-frame frame)
     ;; Ensure, if possible, that frame gets input focus.
-    (when (memq (window-system frame) '(x mac w32))
+    (when (memq (window-system frame) '(x mac w32 ns))
       (x-focus-frame frame))
     (when focus-follows-mouse
       (set-mouse-position (selected-frame) (1- (frame-width)) 0)))
@@ -880,7 +887,7 @@
   (interactive)
   (let ((type (framep (selected-frame))))
     (cond
-     ((memq type '(x w32)) (iconify-or-deiconify-frame))
+     ((memq type '(x ns w32)) (iconify-or-deiconify-frame))
      ((eq type t)
       (if (controlling-tty-p)
          (suspend-emacs)
@@ -920,7 +927,7 @@
     (raise-frame frame)
     (select-frame frame)
     ;; Ensure, if possible, that frame gets input focus.
-    (cond ((memq (window-system frame) '(x w32))
+    (cond ((memq (window-system frame) '(x w32 ns))
           (x-focus-frame frame)))
     (when focus-follows-mouse
       (set-mouse-position frame (1- (frame-width frame)) 0))))
@@ -1157,8 +1164,8 @@
      ((eq system-type 'windows-nt)
       (with-no-warnings
        (> w32-num-mouse-buttons 0)))
-     ((memq frame-type '(x mac))
-      t)    ;; We assume X and Mac *always* have a pointing device
+     ((memq frame-type '(x mac ns))
+      t)    ;; We assume X, Mac, NeXTstep *always* have a pointing device
      (t
       (or (and (featurep 'xt-mouse)
               xterm-mouse-mode)
@@ -1173,7 +1180,7 @@
 Support for popup menus requires that the mouse be available."
   (and
    (let ((frame-type (framep-on-display display)))
-     (memq frame-type '(x w32 pc mac)))
+     (memq frame-type '(x w32 pc mac ns)))
    (display-mouse-p display)))
 
 (defun display-graphic-p (&optional display)
@@ -1183,7 +1190,7 @@
 that use a window system such as X, and false for text-only terminals.
 DISPLAY can be a display name, a frame, or nil (meaning the selected
 frame's display)."
-  (not (null (memq (framep-on-display display) '(x w32 mac)))))
+  (not (null (memq (framep-on-display display) '(x w32 mac ns)))))
 
 (defun display-images-p (&optional display)
   "Return non-nil if DISPLAY can display images.
@@ -1211,7 +1218,7 @@
       ;; the Windows' DOS Box.
       (with-no-warnings
        (not (null dos-windows-version))))
-     ((memq frame-type '(x w32 mac))
+     ((memq frame-type '(x w32 mac ns))
       t)    ;; FIXME?
      (t
       nil))))
@@ -1222,7 +1229,7 @@
   "Return the number of screens associated with DISPLAY."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac))
+     ((memq frame-type '(x w32 mac ns))
       (x-display-screens display))
      (t
       1))))
@@ -1234,7 +1241,7 @@
 For character terminals, each character counts as a single pixel."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac))
+     ((memq frame-type '(x w32 mac ns))
       (x-display-pixel-height display))
      (t
       (frame-height (if (framep display) display (selected-frame)))))))
@@ -1246,7 +1253,7 @@
 For character terminals, each character counts as a single pixel."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac))
+     ((memq frame-type '(x w32 mac ns))
       (x-display-pixel-width display))
      (t
       (frame-width (if (framep display) display (selected-frame)))))))
@@ -1275,7 +1282,7 @@
   "Return the height of DISPLAY's screen in millimeters.
 System values can be overridden by `display-mm-dimensions-alist'.
 If the information is unavailable, value is nil."
-  (and (memq (framep-on-display display) '(x w32 mac))
+  (and (memq (framep-on-display display) '(x w32 mac ns))
        (or (cddr (assoc (or display (frame-parameter nil 'display))
                        display-mm-dimensions-alist))
           (cddr (assoc t display-mm-dimensions-alist))
@@ -1287,7 +1294,7 @@
   "Return the width of DISPLAY's screen in millimeters.
 System values can be overridden by `display-mm-dimensions-alist'.
 If the information is unavailable, value is nil."
-  (and (memq (framep-on-display display) '(x w32 mac))
+  (and (memq (framep-on-display display) '(x w32 mac ns))
        (or (cadr (assoc (or display (frame-parameter nil 'display))
                        display-mm-dimensions-alist))
           (cadr (assoc t display-mm-dimensions-alist))
@@ -1301,7 +1308,7 @@
 the question is inapplicable to a certain kind of display."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac))
+     ((memq frame-type '(x w32 mac ns))
       (x-display-backing-store display))
      (t
       'not-useful))))
@@ -1312,7 +1319,7 @@
   "Return non-nil if DISPLAY's screen supports the SaveUnder feature."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac))
+     ((memq frame-type '(x w32 mac ns))
       (x-display-save-under display))
      (t
       'not-useful))))
@@ -1323,7 +1330,7 @@
   "Return the number of planes supported by DISPLAY."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac))
+     ((memq frame-type '(x w32 mac ns))
       (x-display-planes display))
      ((eq frame-type 'pc)
       4)
@@ -1336,7 +1343,7 @@
   "Return the number of color cells supported by DISPLAY."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac))
+     ((memq frame-type '(x w32 mac ns))
       (x-display-color-cells display))
      ((eq frame-type 'pc)
       16)
@@ -1351,7 +1358,7 @@
 `static-color', `pseudo-color', `true-color', or `direct-color'."
   (let ((frame-type (framep-on-display display)))
     (cond
-     ((memq frame-type '(x w32 mac))
+     ((memq frame-type '(x w32 mac ns))
       (x-display-visual-class display))
      ((and (memq frame-type '(pc t))
           (tty-display-color-p display))




reply via email to

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