From: Aaron Jensen <aaronjensen@gmail.com>
To: sean@farley.io, 59790@debbugs.gnu.org
Subject: bug#59790: 30.0.50; ns-use-native-fullscreen is not respected for first use of initial-frame-alist
Date: Sun, 17 Nov 2024 00:00:07 -0500 [thread overview]
Message-ID: <CAHyO48w9trVhb4eLRNyooNKBDWPBrBctcpjHTzOu-GokeZeQhQ@mail.gmail.com> (raw)
In-Reply-To: <m2v8mt4340.fsf@farley.io>
[-- Attachment #1.1: Type: text/plain, Size: 763 bytes --]
The bugged behavior is that `ns-use-native-fullscreen' set to nil is not read
when launching emacs.
The attached patch should fix this. The problem is that when the frame is
made, the current value of ns-use-native-fullscreen is copied to a variable
and that's only reset when the frame goes from fullscreen to windowed. I
believe the original intent was to ensure that the mode could not change
while the window was fullscreen already.
This resets the value of fs_is_native if the frame is not already
fullscreen, which allows it to respect the value at the time of the first
fullscreen.
Without this, the only way to get the behavior that Sean is expecting is to
set ns-use-native-fullscreen in early-init, which should not be necessary.
[-- Attachment #1.2: Type: text/html, Size: 1501 bytes --]
[-- Attachment #2: 0001-src-nsterm.m-EmacsView-toggleFullScreen-Reset-fs_is_.patch --]
[-- Type: application/octet-stream, Size: 818 bytes --]
From 8e6138ea26f996895d2e60dad7ec112e916736a9 Mon Sep 17 00:00:00 2001
From: Aaron Jensen <aaronjensen@gmail.com>
Date: Sat, 16 Nov 2024 20:54:59 -0800
Subject: [PATCH] * src/nsterm.m ([EmacsView toggleFullScreen:]): Reset
fs_is_native
---
src/nsterm.m | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/nsterm.m b/src/nsterm.m
index dabc36ce018..d2650843548 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8524,6 +8524,11 @@ - (void)toggleFullScreen: (id)sender
NSTRACE ("[EmacsView toggleFullScreen:]");
+ /* Reset fs_is_native to value of ns-use-native-full-screen if not
+ fullscreen already */
+ if (fs_state != FULLSCREEN_BOTH)
+ fs_is_native = ns_use_native_fullscreen;
+
if (fs_is_native)
{
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
--
2.47.0
next prev parent reply other threads:[~2024-11-17 5:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-03 2:43 bug#59790: 30.0.50; ns-use-native-fullscreen is not respected for first use of initial-frame-alist Sean Farley via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-17 5:00 ` Aaron Jensen [this message]
2024-11-20 21:27 ` Alan Third
2024-11-20 21:38 ` Aaron Jensen
2024-11-20 21:59 ` Alan Third
2024-11-20 22:18 ` Aaron Jensen
2024-11-21 6:23 ` Eli Zaretskii
2024-11-21 7:13 ` Aaron Jensen
2024-11-23 1:12 ` Aaron Jensen
2024-11-23 2:20 ` Aaron Jensen
2024-11-24 12:10 ` Alan Third
2024-11-24 16:18 ` Aaron Jensen
2024-11-24 11:59 ` Alan Third
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHyO48w9trVhb4eLRNyooNKBDWPBrBctcpjHTzOu-GokeZeQhQ@mail.gmail.com \
--to=aaronjensen@gmail.com \
--cc=59790@debbugs.gnu.org \
--cc=sean@farley.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.