;;; frame.el --- multi-frame management independent of window systems
-;; Copyright (C) 1993-1994, 1996-1997, 2000-2013 Free Software
+;; Copyright (C) 1993-1994, 1996-1997, 2000-2014 Free Software
;; Foundation, Inc.
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
;; Package: emacs
Focus-in events occur when a frame has focus, but a switch-frame event
is not generated.
This function runs the hook `focus-in-hook'."
+ (interactive "e")
(run-hooks 'focus-in-hook))
(defun handle-focus-out (_event)
Focus-out events are usually bound to this function.
Focus-out events occur when no frame has focus.
This function runs the hook `focus-out-hook'."
+ (interactive "e")
(run-hooks 'focus-out-hook))
\f
;;;; Arrangement of frames at startup
(declare-function tool-bar-mode "tool-bar" (&optional arg))
+(defalias 'tool-bar-lines-needed 'tool-bar-height)
+
;; startup.el calls this function after loading the user's init
;; file. Now default-frame-alist and initial-frame-alist contain
;; information to which we must react; do what needs to be done.
(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.