Subject: 29.0.60; (make-frame) does not always respect (fullscreen . nil)

From: Kai Ma <[email-masked]>
Date: Sun, 18 Dec 2022 21:28:07 +0800

In a fullscreen (fullboth) Emacs frame, evaluating

    (make-frame '((fullscreen . nil)))

can create a fullscreen (fullboth) frame, instead of a non-fullscreen
one.

Curiously, this seems to only happen to bundled Emacs distribution.  I
cannot reproduce this problem using the bare Emacs binary.

Steps to reproduce on macOS:

 - make install
 - open nextstep/Emacs.app --args -Q
   (If you run src/emacs -Q here, the problem won't happen.)
 - M-x toggle-frame-fullscreen
 - Evaluate   (make-frame '((fullscreen . nil)))
 - Now a _fullscreen_ frame is opened

GNU/Linux version of Emacs does not have this bug, so I suspect this is
NS-specific.

In GNU Emacs 29.0.60 (build 28, x86_64-apple-darwin22.2.0, NS
 appkit-2299.30 Version 13.1 (Build 22C65)) of 2022-12-18 built on
 Kais-MacBook.local
Repository revision: 3941cc29df35d1a6c4071362b4e97a0569b34241
Repository branch: emacs-29
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.1

Configured using:
 'configure --with-json --with-native-compilation --with-xwidgets'

Configured features:
ACL DBUS GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM XWIDGETS ZLIB

Important settings:
  value of $LC_ALL: zh_CN.utf-8
  value of $LANG: zh_CN.utf-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-wakatime-mode: t
  wakatime-mode: t
  popper-echo-mode: t
  popper-mode: t
  hl-todo-mode: t
  rainbow-delimiters-mode: t
  display-line-numbers-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  winner-mode: t
  winum-mode: t
  which-key-mode: t
  corfu-popupinfo-mode: t
  global-corfu-mode: t
  corfu-mode: t
  marginalia-mode: t
  vertico-mouse-mode: t
  vertico-mode: t
  projectile-mode: t
  keyfreq-autosave-mode: t
  keyfreq-mode: t
  rime-regexp-mode: t
  prescient-persist-mode: t
  global-ligature-mode: t
  ligature-mode: t
  ns-auto-titlebar-mode: t
  server-mode: t
  electric-pair-mode: t
  global-auto-revert-mode: t
  global-so-long-mode: t
  delete-selection-mode: t
  override-global-mode: t
  pixel-scroll-precision-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  hs-minor-mode: t

Features:
(shadow sort ecomplete mail-extr emacsbug message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config mailabbrev
gmm-utils mailheader sendmail vertico-directory wakatime-mode autoinsert
popper-echo popper hideshow hl-todo rainbow-delimiters
display-line-numbers tramp-cache time-stamp tramp-sh tramp
tramp-loaddefs trampver tramp-integration cus-edit pp cus-start files-x
tramp-compat shell pcomplete parse-time iso8601 ls-lisp format-spec
recentf tree-widget yasnippet-snippets yasnippet winner winum which-key
corfu-popupinfo kind-icon svg-lib color svg dom xml corfu-prescient
corfu marginalia vertico-mouse vertico comp comp-cstr warnings icons
projectile project grep compile comint ansi-osc ansi-color ibuf-ext
ibuffer ibuffer-loaddefs thingatpt keyfreq fish-protector pcase
prelude-irc prelude-apps rime-regexp rime rime-predicates xdg posframe
popup dash prelude-mail gnus nnheader gnus-util text-property-search
time-date mail-utils range wid-edit prelude-os prelude-help
prelude-lang-zig prelude-lang-web prelude-lang-agda agda2
prelude-lang-haskell derived prelude-lang-js prelude-lang-ml
prelude-lang-coq prelude-lang-rust prelude-lang-python prelude-lang-cc
prelude-lang-lisp prelude-prog prelude-blog prelude-org prelude-tex
prelude-git prelude-dired prelude-chinese prelude-project
prelude-ibuffer prelude-completion orderless prescient char-fold
prelude-search prelude-nix prelude-ui ligature ns-auto-titlebar
prelude-core server finder-inf elec-pair diminish exec-path-from-shell
undohist edmacro kmacro autorevert filenotify so-long delsel
no-littering compat compat-macs prelude-common prelude-package
quelpa-use-package quelpa mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr lisp-mnt help-fns
radix-tree cl-extra help-mode use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core monokai-theme pixel-scroll cua-base ring
cus-load prelude-loaddefs geiser-autoloads julia-mode-autoloads
carbon-now-sh-autoloads symbol-overlay-autoloads molokai-theme-autoloads
ement-autoloads kind-icon-autoloads w3m-load w3m-autoloads
pinyinlib-autoloads rustic-autoloads org-roam-ui-autoloads
xterm-color-autoloads cdlatex-autoloads ns-auto-titlebar-autoloads
rime-autoloads rust-mode-autoloads paredit-autoloads emamux-autoloads
vterm-autoloads treemacs-all-the-icons-autoloads popper-autoloads
merlin-autoloads rainbow-identifiers-autoloads
rainbow-delimiters-autoloads org-roam-bibtex-autoloads org-ref-autoloads
citeproc-autoloads aio-autoloads htmlize-autoloads yaml-mode-autoloads
multiple-cursors-autoloads websocket-autoloads dired-filter-autoloads
auctex-autoloads tex-site zig-mode-autoloads debbugs-autoloads
vue-mode-autoloads edit-indirect-autoloads ssass-mode-autoloads
mmm-mode-autoloads highlight-indentation-autoloads
git-timemachine-autoloads org-noter-autoloads vundo-autoloads
org-modern-autoloads ffmpeg-player-autoloads ox-pandoc-autoloads
helm-bibtex-autoloads bibtex-completion-autoloads org-download-autoloads
queue-autoloads wakatime-mode-autoloads deft-autoloads ix-autoloads
all-the-icons-dired-autoloads ccls-autoloads org-contrib-autoloads
dash-at-point-autoloads embark-consult-autoloads consult-autoloads
elfeed-autoloads proof-general-autoloads proof-site proof-autoloads
ripgrep-autoloads dumb-jump-autoloads rainbow-mode-autoloads
utop-autoloads tuareg-autoloads rx caml-autoloads grapnel-autoloads
simple-httpd-autoloads clojure-mode-autoloads nix-mode-autoloads
yasnippet-snippets-autoloads citre-autoloads which-key-autoloads
company-coq-autoloads company-math-autoloads company-autoloads
solarized-theme-autoloads quickrun-autoloads speed-type-autoloads
helpful-autoloads elisp-refs-autoloads parseedn-autoloads
expand-region-autoloads modern-cpp-font-lock-autoloads tablist-autoloads
ob-rust-autoloads biblio-autoloads biblio-core-autoloads
org-latex-impatient-autoloads vue-html-mode-autoloads undohist-autoloads
alert-autoloads gntp-autoloads string-inflection-autoloads
js-format-autoloads js2-mode-autoloads keyfreq-autoloads forge-autoloads
magit-autoloads git-commit-autoloads with-editor-autoloads
ghub-autoloads treepy-autoloads closql-autoloads ormolu-autoloads
reformatter-autoloads diminish-autoloads dired-hacks-utils-autoloads
wgrep-autoloads embark-autoloads org-appear-autoloads
nix-sandbox-autoloads web-mode-autoloads cape-autoloads
flycheck-haskell-autoloads haskell-mode-autoloads org-roam-autoloads
emacsql-sqlite-autoloads google-translate-autoloads
quelpa-use-package-autoloads use-package-autoloads bind-key-autoloads
quelpa-autoloads diff-hl-autoloads log4e-autoloads vertico-autoloads
parsebib-autoloads treemacs-projectile-autoloads projectile-autoloads
valign-autoloads visual-fill-column-autoloads smartparens-autoloads
marginalia-autoloads yasnippet-autoloads corfu-prescient-autoloads
corfu-autoloads hl-todo-autoloads transient-autoloads
dockerfile-mode-autoloads dune-autoloads helm-autoloads popup-autoloads
all-the-icons-ibuffer-autoloads all-the-icons-autoloads
math-symbol-lists-autoloads sly-autoloads parseclj-autoloads
helm-core-autoloads async-autoloads go-translate-autoloads
taxy-magit-section-autoloads taxy-autoloads magit-section-autoloads
nov-autoloads esxml-autoloads kv-autoloads lsp-ui-autoloads
no-littering-autoloads compat-autoloads svg-lib-autoloads
doom-themes-autoloads orderless-autoloads ligature-autoloads
minimap-autoloads prescient-autoloads winum-autoloads plz-autoloads
nim-mode-autoloads flycheck-nimsuggest-autoloads flycheck-autoloads
pkg-info-autoloads epl-autoloads commenter-autoloads epc-autoloads
ctable-autoloads concurrent-autoloads deferred-autoloads
emacsql-autoloads fish-mode-autoloads dap-mode-autoloads
lsp-docker-autoloads yaml-autoloads lsp-treemacs-autoloads
treemacs-autoloads cfrs-autoloads posframe-autoloads hydra-autoloads
pfuture-autoloads ace-window-autoloads avy-autoloads bui-autoloads
lsp-mode-autoloads lv-autoloads markdown-mode-autoloads
spinner-autoloads ht-autoloads f-autoloads s-autoloads info
dash-autoloads exec-path-from-shell-autoloads monokai-theme-autoloads
package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
password-cache json subr-x map byte-opt gv bytecomp byte-compile
url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads xwidget-internal dbusbind
kqueue cocoa ns lcms2 multi-tty make-network-process native-compile
emacs)

Memory information:
((conses 16 924000 369948)
 (symbols 48 25851 11)
 (strings 32 663504 73180)
 (string-bytes 1 37819787)
 (vectors 16 46328)
 (vector-slots 8 1590678 297299)
 (floats 8 266 611)
 (intervals 56 561 110)
 (buffers 984 11))