Re-enable menu-bar-lines for GUI frames on MacOS #2156
This commit is contained in:
parent
a0425d0df7
commit
3583e1f2e0
1 changed files with 7 additions and 3 deletions
|
@ -300,10 +300,14 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
||||||
(require 'ns-auto-titlebar nil t)
|
(require 'ns-auto-titlebar nil t)
|
||||||
(ns-auto-titlebar-mode +1))
|
(ns-auto-titlebar-mode +1))
|
||||||
|
|
||||||
(add-hook! 'after-make-frame-functions
|
;; HACK On MacOS, disabling the menu bar makes MacOS treat Emacs as a
|
||||||
|
;; non-application window -- which means it doesn't automatically capture
|
||||||
|
;; focus when it is started, among other things. We enable menu-bar-lines
|
||||||
|
;; there, but we still want it disabled in terminal frames because there
|
||||||
|
;; it activates an ugly menu bar.
|
||||||
|
(add-hook! '(window-setup-hook after-make-frame-functions)
|
||||||
(defun doom-init-menu-bar-in-gui-frames-h (frame)
|
(defun doom-init-menu-bar-in-gui-frames-h (frame)
|
||||||
"On MacOS, the menu bar isn't part of the frame. Disabling it makes MacOS
|
"Re-enable menu-bar-lines in GUI frames."
|
||||||
treat Emacs as a non-application window."
|
|
||||||
(when (display-graphic-p frame)
|
(when (display-graphic-p frame)
|
||||||
(set-frame-parameter frame 'menu-bar-lines 1)))))
|
(set-frame-parameter frame 'menu-bar-lines 1)))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue