Received: (at 80307) by debbugs.gnu.org; 2 Feb 2026 12:28:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 02 07:28:30 2026 Received: from localhost ([127.0.0.1]:55750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vmt2b-0003Cc-8C for submit <at> debbugs.gnu.org; Mon, 02 Feb 2026 07:28:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34840) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vmt2Y-0003CC-LX for 80307 <at> debbugs.gnu.org; Mon, 02 Feb 2026 07:28:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vmt2S-00058H-QM; Mon, 02 Feb 2026 07:28:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=tGKpOaz2yv7gCdREw4vXd8rDHK3rqgSBzV4PxWcgsnQ=; b=IZiZqTgYWo+FXHuc+ISk y9CAa1xniwcZ3fIDQJ/m1q3VUt6H5EfS5tpTM5Vu3GtTOjoY+ENDQ29bkWz+VCPIMifnKGvBm2p3f c75huOl8+lmGQ66gaHq6O9tzFbA90g40C9HXU8tPB3OSfInhnBMmQ6ghgd44DIiIxwNguSEc7ROhh zczN4SDXzWH9woGz70aGXld+kHu84urr4am/mDWtiLCnWIqej6O+LkzW/cNw/tsCK5Uj8z81gCCff ICL8owBSxt2Ug8KNF9VSy+PT5qzMHh5xlkFhpmuIXoxiintMBuSmlQpjiXuZ9RSEaVJtzq+Zkj1lY YGc8C1+77S8O6Q==; Date: Mon, 02 Feb 2026 14:28:19 +0200 Message-Id: <86ikcf2uu4.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: opensauce04@HIDDEN In-Reply-To: <73b73b62-155a-48f5-afc0-ab401f721372@HIDDEN> (opensauce04@HIDDEN) Subject: Re: bug#80307: Add ns-toolbar-style frame parameter on macOS References: <a2ed9095-e014-4902-90a5-9329a5f17297@HIDDEN> <86a4xs4xl3.fsf@HIDDEN> <73b73b62-155a-48f5-afc0-ab401f721372@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 80307 Cc: 80307 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Sun, 1 Feb 2026 12:24:08 +0000 > Cc: 80307 <at> debbugs.gnu.org > From: opensauce04@HIDDEN > > > Please post patches as binary attachments, preferably using the output > > of the "git format-patch" command. The way you did it, your email > > software squashed the leading whitespace of every line, which makes > > the patch unusable. > > Ah, sorry! I assumed that when Emacs put the patch text into the email > body, it would just ready to send as-is. No sweat, no harm done. > > We try to avoid having features that are only available on > > some platforms, especially if those platforms are proprietary. So I > > must ask: is this kind of feature available on GNU/Linux, in the GTK > > or PGTK builds? If not, we will need to wait until those builds can > > use this feature. > > This seems rather arbitrary. If that's the case, why does Emacs > support using the macOS-exclusive ns-transparent-titlebar and > ns-appearance values? I presume that something similar exists on GNU/Linux. Or maybe it was a mistake > In fact, ns-toolbar-style arguably has more of a right to exist > because it's being introduced in response to a non-user-configurable > change Emacs made to its appearance which some users evidently won't > like. In the email exchange where the change was introduced, someone > voiced their dislike for the new appearance, calling it "outdated" > and bringing up the valid criticism that it takes away vertical > space. I'm sure there are others that would feel the same if they > knew of the change, but they either aren't using Emacs 31 or don't > follow the mailing list. I was one of those people until the other > day when I built Emacs 31 out of curiosity and discovered the > change, and I agree with the person in the mailing list that the new > toolbar style is an overall downgrade. If you want to discuss a possible change in the default behavior, we can do that without any restrictions. If macOS users in general agree that the current default is not the best one, I see now reason not to change the default. But supporting user-defined control of the behavior is a different matter. > It's also worth noting that this patch doesn't really introduce any > new interactions with proprietary frameworks. The code which sets > `setToolbarStyle` was introduced by the patch I referenced in my > original email. This feature simply allows users to control which > value is passed to `setToolbarStyle`. What matters for us in this case are the user-facing features and capabilities, not the software mechanisms used by the implementation.
bug-gnu-emacs@HIDDEN:bug#80307; Package emacs.
Full text available.
Received: (at 80307) by debbugs.gnu.org; 1 Feb 2026 13:14:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 01 08:14:14 2026
Received: from localhost ([127.0.0.1]:38488 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vmXHH-00077M-La
for submit <at> debbugs.gnu.org; Sun, 01 Feb 2026 08:14:14 -0500
Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:50584)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.84_2) (envelope-from <opensauce04@HIDDEN>)
id 1vmWko-0004JA-Ty
for 80307 <at> debbugs.gnu.org; Sun, 01 Feb 2026 07:40:40 -0500
Received: by mail-wr1-x42d.google.com with SMTP id
ffacd0b85a97d-4359a302794so2456569f8f.1
for <80307 <at> debbugs.gnu.org>; Sun, 01 Feb 2026 04:40:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1769949638; x=1770554438; darn=debbugs.gnu.org;
h=subject:from:to:content-language:user-agent:mime-version:date
:message-id:from:to:cc:subject:date:message-id:reply-to;
bh=BYn1GnI5QHoHlnj4aZFSGD+W4YXNJcdj1L3hZZTH1wA=;
b=bWwgd17zElwOLZd/LTXoIbfYh9iXtqNa0FT/SPWZwk9ezkfvNTVvUCXbUQ1HvzvcMX
O47flAiz40Sv+zlFNZZfdTK3I0vKzZY9Nh8loAQPXhshcT76SevpCEjakqfu00Y6uI8s
INn5ywhKjxKiiR9U1V8CrAw8a6yeovWnhgiSpI95ZuP/SZ+W/uOFInF/RTBr/ndhZVMV
h9QTX5VnrZV52kfuas2Gc7wufpbl457ErMXzotUxhazfnLzS+jjS5GuqiM5xnODNBC+g
p76Y7TPAd5lQCP+w3mEs2UmrssAzaYWqD3kHJCh3h+RvGW1uJ8/39JWzWiaLFhwbcACk
HV5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1769949638; x=1770554438;
h=subject:from:to:content-language:user-agent:mime-version:date
:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=BYn1GnI5QHoHlnj4aZFSGD+W4YXNJcdj1L3hZZTH1wA=;
b=AB/NSJY+VGFLRy0cBLMY9JDHFUkZUti3knGpAOPMQifwUaEzkMpoXemaZuQxP+NksV
dyexpPy22b63i80x7O1fDP0J1KL3cZZhTSqlFqlqO8xgmahRNlhyJJV1BSyRi0sdJh0w
vOfd3XF0XMrylZ71aQeMUa6InLHYTVac3W8GsYAzSFtTtiZvCJlFb/TgrAN9DYpYkfx1
8l2vhvvta4wDAVnqB4060PjXYskdIRsPzCzD+ZMjksLtCzb+dZD4ocRkX/3ZqbEp6jKV
dyEm0pOr3X9atsX9A8LPm0h6dtYAGLb8o9WyuPZexXTx1cFY5PqL5RKvrA5+DoBgbL51
oRTg==
X-Gm-Message-State: AOJu0YxRrFTiFxpqt5g9lnD3V8SSOrdFLG7mn5a1h91qCv8dqTggZ+q2
602ikO3wJFVc7uYydQPhJu67TbuUtwSDqP/ToevtsP7f2/aI4pYpz9SGsxULwA==
X-Gm-Gg: AZuq6aJKzZZ5CjqtnUpOjV6CprGtqAJ2OhfPpMu85ClrDdn8wpQgGB1Je4ArG8+k9Rg
2Tyq8TvF0iHTh3tW0O+ET56CPowNPIT73XYPdDxfYlksVjmrJSJ7bJ9RGrF+xq9kVDmTFoqqkPs
4T8/0vP10Un90US7fWzSLGnn4s+sIdUVTF4UAOE0ZjzoOBkXaYbX1nmPnt2//7tp+xFgcAGwD8Y
uUt+ZWJ4YD+h5JKqqyxPMxXeLRXXaJyykwiEat+qK0w7c4S63xPk2j9huOMR3yr4KUGzYqsMG6r
X5q4ifqYVzo0BJKfRkW4Cbmqh+0kd6H8sH3xzdG390doadFjIdjEuc9lIaH9fHUImGIPczIEVf+
d2UqPotlm2Lm6S+aScxhNfGG6mblNjM+8yL6GM4RU3tGrtfBK1rONq8XbSvXpSoUunq8me5KALC
5jUb/KOTGayLrVLQ3fGFcvxynnwtYqqjQwtHfvP3JuzvYYDozOYKj8QRk/PbeBJF3HhD+lcE+fv
6Vv1g==
X-Received: by 2002:a05:600c:1549:b0:471:114e:5894 with SMTP id
5b1f17b1804b1-482db4e3054mr100938575e9.25.1769949637632;
Sun, 01 Feb 2026 04:40:37 -0800 (PST)
Received: from ?IPV6:2a0a:ef40:2c:1c01:1fc:fc96:1ade:bda8?
([2a0a:ef40:2c:1c01:1fc:fc96:1ade:bda8])
by smtp.gmail.com with ESMTPSA id
5b1f17b1804b1-4806cdebf86sm304882995e9.8.2026.02.01.04.40.36
for <80307 <at> debbugs.gnu.org>
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Sun, 01 Feb 2026 04:40:36 -0800 (PST)
Content-Type: multipart/mixed; boundary="------------gUyr1DL2B3f5BzyRxUu0qPVL"
Message-ID: <18297495-5e1e-4800-919b-05e1d51f9738@HIDDEN>
Date: Sun, 1 Feb 2026 12:40:36 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
To: 80307 <at> debbugs.gnu.org
From: opensauce04@HIDDEN
Subject: Re: bug#80307: Add ns-toolbar-style frame parameter on macOS
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: > Please post patches as binary attachments, preferably using
the output > of the "git format-patch" command. The way you did it, your
email > software squashed the leading whitespace of every line, [...]
Content analysis details: (1.3 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (opensauce04[at]gmail.com)
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers
-0.0 SPF_PASS SPF: sender matches SPF record
0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
in digit (opensauce04[at]gmail.com)
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust
[2a00:1450:4864:20:0:0:0:42d listed in]
[list.dnswl.org]
0.0 HTML_MESSAGE BODY: HTML included in message
X-Debbugs-Envelope-To: 80307
X-Mailman-Approved-At: Sun, 01 Feb 2026 08:14:09 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)
This is a multi-part message in MIME format.
--------------gUyr1DL2B3f5BzyRxUu0qPVL
Content-Type: multipart/alternative;
boundary="------------xIomRETQut006D3Z3cV11WIo"
--------------xIomRETQut006D3Z3cV11WIo
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
> Please post patches as binary attachments, preferably using the output
> of the "git format-patch" command. The way you did it, your email
> software squashed the leading whitespace of every line, which makes
> the patch unusable.
Ah, sorry! I assumed that when Emacs put the patch text into the email
body, it would just ready to send as-is.
> In any case, the names of the styles should not blindly follow the
> macOS names, but instead make sense to Emacs users. For example,
> "preference" should probably be called "centered", "expanded" should
> be "left-aligned" or somesuch, etc.
I've attached a new patch which addresses this. These are how the changes
map to the old names:
- auto <- automatic
- left <- expanded
- center <- preference
- right <- unified
- right-compact <- unified-compact
I dropped the proposed '-aligned' suffix because it seemed redundant to add
it to each option when they all align the toolbar in some way. Please
let me know
if you feel differently and I'll adjust the names accordingly.
> We try to avoid having features that are only available on
> some platforms, especially if those platforms are proprietary. So I
> must ask: is this kind of feature available on GNU/Linux, in the GTK
> or PGTK builds? If not, we will need to wait until those builds can
> use this feature.
This seems rather arbitrary. If that's the case, why does Emacs support
using
the macOS-exclusive ns-transparent-titlebar and ns-appearance values? I
don't
see any reasons that those would be included and this wouldn't.
In fact, ns-toolbar-style arguably has more of a right to exist because
it's being
introduced in response to a non-user-configurable change Emacs made to its
appearance which some users evidently won't like. In the email exchange
where the
change was introduced, someone voiced their dislike for the new appearance,
calling it "outdated" and bringing up the valid criticism that it takes
away vertical space.
I'm sure there are others that would feel the same if they knew of the
change, but they either
aren't using Emacs 31 or don't follow the mailing list. I was one of
those people until
the other day when I built Emacs 31 out of curiosity and discovered the
change, and
I agree with the person in the mailing list that the new toolbar style
is an overall downgrade.
It's also worth noting that this patch doesn't really introduce any new
interactions with
proprietary frameworks. The code which sets `setToolbarStyle` was
introduced by the patch
I referenced in my original email. This feature simply allows users to
control which value is
passed to `setToolbarStyle`.
--------------xIomRETQut006D3Z3cV11WIo
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<blockquote type="cite" style="color: #007cff;">Please post patches
as binary attachments, preferably using the output
<br>
of the "git format-patch" command. The way you did it, your email
<br>
software squashed the leading whitespace of every line, which
makes
<br>
the patch unusable.
<br>
</blockquote>
<br>
Ah, sorry! I assumed that when Emacs put the patch text into the
email
<br>
body, it would just ready to send as-is.
<br>
<br>
<blockquote type="cite" style="color: #007cff;">In any case, the
names of the styles should not blindly follow the
<br>
macOS names, but instead make sense to Emacs users. For example,
<br>
"preference" should probably be called "centered", "expanded"
should
<br>
be "left-aligned" or somesuch, etc.
<br>
</blockquote>
<br>
I've attached a new patch which addresses this. These are how the
changes
<br>
map to the old names:
<br>
- auto <- automatic
<br>
- left <- expanded
<br>
- center <- preference
<br>
- right <- unified
<br>
- right-compact <- unified-compact
<br>
I dropped the proposed '-aligned' suffix because it seemed redundant
to add
<br>
it to each option when they all align the toolbar in some way.
Please let me know
<br>
if you feel differently and I'll adjust the names accordingly.
<br>
<br>
<blockquote type="cite" style="color: #007cff;">We try to avoid
having features that are only available on
<br>
some platforms, especially if those platforms are proprietary. So
I
<br>
must ask: is this kind of feature available on GNU/Linux, in the
GTK
<br>
or PGTK builds? If not, we will need to wait until those builds
can
<br>
use this feature. </blockquote>
<br>
This seems rather arbitrary. If that's the case, why does Emacs
support using
<br>
the macOS-exclusive ns-transparent-titlebar and ns-appearance
values? I don't
<br>
see any reasons that those would be included and this wouldn't.
<br>
<br>
In fact, ns-toolbar-style arguably has more of a right to exist
because it's being
<br>
introduced in response to a non-user-configurable change Emacs made
to its
<br>
appearance which some users evidently won't like. In the email
exchange where the
<br>
change was introduced, someone voiced their dislike for the new
appearance,
<br>
calling it "outdated" and bringing up the valid criticism that it
takes away vertical space.
<br>
I'm sure there are others that would feel the same if they knew of
the change, but they either
<br>
aren't using Emacs 31 or don't follow the mailing list. I was one of
those people until
<br>
the other day when I built Emacs 31 out of curiosity and discovered
the change, and
<br>
I agree with the person in the mailing list that the new toolbar
style is an overall downgrade.
<br>
<br>
It's also worth noting that this patch doesn't really introduce any
new interactions with
<br>
proprietary frameworks. The code which sets `setToolbarStyle` was
introduced by the patch
<br>
I referenced in my original email. This feature simply allows users
to control which value is
<br>
passed to `setToolbarStyle`.
<p><br>
</p>
</body>
</html>
--------------xIomRETQut006D3Z3cV11WIo--
--------------gUyr1DL2B3f5BzyRxUu0qPVL
Content-Type: text/plain; charset=UTF-8;
name="emacs-ns-toolbar-style-v2.patch"
Content-Disposition: attachment; filename="emacs-ns-toolbar-style-v2.patch"
Content-Transfer-Encoding: base64
ZGlmZiAtLWdpdCBhL2RvYy9saXNwcmVmL2ZyYW1lcy50ZXhpIGIvZG9jL2xpc3ByZWYvZnJh
bWVzLnRleGkKaW5kZXggYmRkNzk1MjhjYWMuLjE5Y2ZkZjkyZGNhIDEwMDY0NAotLS0gYS9k
b2MvbGlzcHJlZi9mcmFtZXMudGV4aQorKysgYi9kb2MvbGlzcHJlZi9mcmFtZXMudGV4aQpA
QCAtMjQ1NSw2ICsyNDU1LDIxIEBAIE1hbmFnZW1lbnQgUGFyYW1ldGVycwogb2YgYm90a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sgd2hlcmUgdGhlIHRvb2xiYXIgc3R5bGUg
aXMgZGVjaWRlZCBieSB0aGUgc3lzdGVtCisgICAgICAgICAod2hpY2ggaXMgdW5wcmVkaWN0
YWJsZSkgYW5kIHRoZSBuZXdmYW5nbGVkICJjb21wYWN0IiB0b29sYmFyCisgICAgICAgICBt
YXkgYmUgY2hvc2VuICh3aGljaCBpcyB1bmRlc2lyYWJsZSkuICAqLwogI2lmIGRlZmluZWQg
KE5TX0lNUExfQ09DT0EpICYmIE1BQ19PU19YX1ZFUlNJT05fTUFYX0FMTE9XRUQgPj0gMTEw
MDAwCi0gICAgICBpZiAoW3NlbGYgcmVzcG9uZHNUb1NlbGVjdG9yOkBzZWxlY3RvcihzZXRU
b29sYmFyU3R5bGU6KV0pCi0JW3NlbGYgc2V0VG9vbGJhclN0eWxlOiBOU1dpbmRvd1Rvb2xi
YXJTdHlsZUV4cGFuZGVkXTsKKyAgICAgIGlmIChbc2VsZiByZXNwb25kc1RvU2VsZWN0b3I6
QHNlbGVjdG9yKHNldFRvb2xiYXJTdHlsZTopXSkgeworICAgICAgICBbc2VsZiBzZXRUb29s
YmFyU3R5bGU6IG5zX2dldF90b29sYmFyX3N0eWxlKEZSQU1FX05TX1RPT0xCQVJfU1RZTEUg
KGYpKV07CisgICAgICB9CiAjZW5kaWYKICAgICB9CiAK
--------------gUyr1DL2B3f5BzyRxUu0qPVL--
bug-gnu-emacs@HIDDEN:bug#80307; Package emacs.
Full text available.Received: (at 80307) by debbugs.gnu.org; 1 Feb 2026 09:33:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 01 04:33:58 2026 Received: from localhost ([127.0.0.1]:36187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vmTq9-0004VF-FO for submit <at> debbugs.gnu.org; Sun, 01 Feb 2026 04:33:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50706) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vmTq7-0004UQ-Dn for 80307 <at> debbugs.gnu.org; Sun, 01 Feb 2026 04:33:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vmTq2-0002Dv-2I; Sun, 01 Feb 2026 04:33:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KjUw6QbM0M1iHSjHZJ1BSd1s2EnpuRLvH503i2373+I=; b=jRzz+68V58EM 0PqKSsAoj5+PmzkxTKZ7D4pRmzEm5z8j2E3roOQIRA25f7769y+ymAxCt1XmbZYn29NhndUyZD2n4 +PJHMiZ/AC4vZEdDRBTwnBLCC6MdHPLWSkryTiHZVC9kYiNR8zCiKd2uYy+yhMet9xmCzDYBmy3iA YTdJuraQvazDGdGiL/s7z89yN8vi7J7vLa+nU20taAG3HVwpo06AzcAmCtiPUN1vwdfHyKdatD35N DfbIXWMbrtlW/udh4TKDwVS48KL57ZDMubRV9f3FBRYce/5DYdzzB7sTWjUJCUQV7u4uJiB60sbVl +2kAioHTX00wBCerC73KgQ==; Date: Sun, 01 Feb 2026 11:33:44 +0200 Message-Id: <86a4xs4xl3.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: opensauce04@HIDDEN In-Reply-To: <a2ed9095-e014-4902-90a5-9329a5f17297@HIDDEN> (opensauce04@HIDDEN) Subject: Re: bug#80307: Add ns-toolbar-style frame parameter on macOS References: <a2ed9095-e014-4902-90a5-9329a5f17297@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 80307 Cc: 80307 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Sat, 31 Jan 2026 22:40:47 +0000 > From: opensauce04@HIDDEN > > I am submitting a patch which makes the window toolbar style > configurable on macOS. > > My motivation for this change was an adjustment made to Emacs 31 > relatively recently (Bug #79900) which adjusted the default appearance > of the toolbar on macOS from having the style automatically set by macOS > to instead using the (in my opinion, inferior) "expanded" toolbar style. > This change was not user-configurable, meaning use of this new style is > currently forced on users unless they modify Emacs's Objective C source > code, > and a maintainer encouraged others to submit a patch if anyone wished > for the style to be made configurable. > > I implemented this by adding a new `ns-toolbar-style` frame parameter > which can > be adjusted by the user to immediately switch between any of the 5 > available toolbar style options listed here: > https://developer.apple.com/documentation/appkit/nswindow/toolbarstyle-swift.enum Thanks. We try to avoid having features that are only available on some platforms, especially if those platforms are proprietary. So I must ask: is this kind of feature available on GNU/Linux, in the GTK or PGTK builds? If not, we will need to wait until those builds can use this feature. In any case, the names of the styles should not blindly follow the macOS names, but instead make sense to Emacs users. For example, "preference" should probably be called "centered", "expanded" should be "left-aligned" or somesuch, etc. > This is my first time interacting with the Emacs codebase, my first time > meaningfully interacting with Objective C, and my first time submitting > any patch via email, so hopefully I didn't make any egregious mistakes! > Please let me know if I did anything wrong or if there's anything I need > to adjust! Please post patches as binary attachments, preferably using the output of the "git format-patch" command. The way you did it, your email software squashed the leading whitespace of every line, which makes the patch unusable. Thanks again for your interest in Emacs.
bug-gnu-emacs@HIDDEN:bug#80307; Package emacs.
Full text available.
Received: (at submit) by debbugs.gnu.org; 1 Feb 2026 08:59:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 01 03:59:22 2026
Received: from localhost ([127.0.0.1]:35772 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vmTIf-00013t-5z
for submit <at> debbugs.gnu.org; Sun, 01 Feb 2026 03:59:22 -0500
Received: from lists.gnu.org ([2001:470:142::17]:42814)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <opensauce04@HIDDEN>)
id 1vmJeD-0003SI-Um
for submit <at> debbugs.gnu.org; Sat, 31 Jan 2026 17:40:58 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <opensauce04@HIDDEN>)
id 1vmJe8-00017e-FM
for bug-gnu-emacs@HIDDEN; Sat, 31 Jan 2026 17:40:52 -0500
Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from <opensauce04@HIDDEN>)
id 1vmJe6-0005bL-1w
for bug-gnu-emacs@HIDDEN; Sat, 31 Jan 2026 17:40:52 -0500
Received: by mail-wr1-x42b.google.com with SMTP id
ffacd0b85a97d-4327555464cso2337284f8f.1
for <bug-gnu-emacs@HIDDEN>; Sat, 31 Jan 2026 14:40:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1769899248; x=1770504048; darn=gnu.org;
h=content-transfer-encoding:from:content-language:subject:to
:user-agent:mime-version:date:message-id:from:to:cc:subject:date
:message-id:reply-to;
bh=xZ+Kgl+VS2v9TF6wfyW32V3OoaVeUKWiUawAwmyby44=;
b=R3r7eTpjG1Kwi3/wdhWS8CehexTncPFMbB3ic38U0dJzy3Gu9qplzkjpLFPt5f0U3J
wqiqWilmVI5tAE38iBuwkpFje/zMNvGrTErBZ9ZsefWweh1al3FkMHREvaqws55eA2Cx
VdJalA0GWBEWJJJJ41o9uPWXFv+rLMOiIxXkvRmPmfMFuus/NTHBVbRjWHO6jR/Y5DZQ
Gz4Mx9272r7QagXrDZKJlY0oSLBgFYczAoHYulzt3UqlQDCqw/8Uz92qIja7zDyT9wTd
W2+wXKERUTwj+GJeWeYtBIozIbe/+y1CXfWerSekBxF+d2m8KY/oLBKHaWhBTzTK7+Es
IZVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1769899248; x=1770504048;
h=content-transfer-encoding:from:content-language:subject:to
:user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=xZ+Kgl+VS2v9TF6wfyW32V3OoaVeUKWiUawAwmyby44=;
b=eslTFsN/h+AEccfzhqNEwZJW6LQBF3t/xUmSudJ7Jm74Y+Qw0e5oj4fv0EIC8a7mXA
GQLTxqE5w88OdjtsGX+ltLYc9srOTckEGCBH5KBKiZCF5zAzg4XUOdozWEusyz+zr8E0
NJuDL6U4nNi/lU+oDaiqtQhFFTdinxgMLuHawkMhssWfud5VpvnjtRb3rwTGx/TMMZwc
RXnSDbhOgEN2Wc6VMVbqrRIT5j8Pq5W6TlOa61rDKWJwwov6LV6KZoIq0ypxLZk6Lax5
sz8/MrFy3h6B23ptSvDCF8+CuO47zAVQs2okgCTbWxHn+61eaNd84AkHe+2XcIWSuNl3
/x+A==
X-Gm-Message-State: AOJu0Yy7w9745FiplfG0lViRozqq4CnLrCAr22ai4H6AGZoi9ukcrY9c
VMEuCH4j7kJj6l6hFPNJwS92WHuSSdUFUmmoWnBc4y9UEiiTXxrnVMCy6jEhvw==
X-Gm-Gg: AZuq6aLqoC/TW9foQXDSb9CJYopYOAaCL2wiGGLhayWp0EJ5Vs60hk31I4v2p9EjXEn
ITrHG4GaXWRDsHqaQNZva9mI28QAZVxm6Td48ofDjsRqdvBPCBnPgoTUuSoMuiAtcDPoZVOtWnh
wzAaDUGWKshRnSwFsv1rnsNJzwhfytAcw2/yh2S+L7uM8lC41pIqYXPUcxM2ER3iyNJalutaRGc
W8+4NeGfOYB0upG7LwnmnpcyU7JvWgw6ez9gxAzb6iypcR2+++XyAaGIwKD2ynwv0J4OpFq4iCH
IFQzq0PoQuLin1YwaFBwpd2mdY9FK3NO8HOGDs9ZRH3jnzaHmDW/GWNjCop68Gn1KqsRXmslpND
eAOFw1OXV6/T/XOZirLYBTvSX32An8xM8uSXv/zyz/61nOJwjRB3YUFyTXcnK3aqpeLO78wmf4H
eQkOL4F7Q+YOjMr6lObwAkYuqP+aFm8TEMgxdmOyf2rs7h6kNLVz1euqTamAdr159w/GUVrIUDy
upMBXLZ
X-Received: by 2002:a05:6000:40c7:b0:42f:b9c6:c894 with SMTP id
ffacd0b85a97d-435f3aaf86fmr10491995f8f.52.1769899247661;
Sat, 31 Jan 2026 14:40:47 -0800 (PST)
Received: from ?IPV6:2a0a:ef40:2c:1c01:f509:c547:5c90:ce44?
([2a0a:ef40:2c:1c01:f509:c547:5c90:ce44])
by smtp.gmail.com with ESMTPSA id
ffacd0b85a97d-435e1323034sm33215474f8f.35.2026.01.31.14.40.47
for <bug-gnu-emacs@HIDDEN>
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Sat, 31 Jan 2026 14:40:47 -0800 (PST)
Message-ID: <a2ed9095-e014-4902-90a5-9329a5f17297@HIDDEN>
Date: Sat, 31 Jan 2026 22:40:47 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: bug-gnu-emacs@HIDDEN
Subject: Add ns-toolbar-style frame parameter on macOS
Content-Language: en-GB
From: opensauce04@HIDDEN
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=2a00:1450:4864:20::42b;
envelope-from=opensauce04@HIDDEN; helo=mail-wr1-x42b.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 2.2 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: --=-=-= Content-Type: text/plain Tags: patch I am submitting
a patch which makes the window toolbar style configurable on macOS.
Content analysis details: (2.2 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (opensauce04[at]gmail.com)
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers -0.0 SPF_HELO_PASS SPF: HELO matches SPF record
1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
in digit (opensauce04[at]gmail.com)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 01 Feb 2026 03:59:20 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: --=-=-= Content-Type: text/plain Tags: patch I am submitting
a patch which makes the window toolbar style configurable on macOS.
Content analysis details: (1.2 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (opensauce04[at]gmail.com)
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
in digit (opensauce04[at]gmail.com)
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust
[2001:470:142:0:0:0:0:17 listed in]
[list.dnswl.org]
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
--=-=-=
Content-Type: text/plain
Tags: patch
I am submitting a patch which makes the window toolbar style
configurable on macOS.
My motivation for this change was an adjustment made to Emacs 31
relatively recently (Bug #79900) which adjusted the default appearance
of the toolbar on macOS from having the style automatically set by macOS
to instead using the (in my opinion, inferior) "expanded" toolbar style.
This change was not user-configurable, meaning use of this new style is
currently forced on users unless they modify Emacs's Objective C source
code,
and a maintainer encouraged others to submit a patch if anyone wished
for the style to be made configurable.
I implemented this by adding a new `ns-toolbar-style` frame parameter
which can
be adjusted by the user to immediately switch between any of the 5
available toolbar style options listed here:
https://developer.apple.com/documentation/appkit/nswindow/toolbarstyle-swift.enum
I have locally tested all of these available options, and they all
appear as expected. I based the implementation of this new frame parameter
on the existing surrounding code, so hopefully I am following expected
best practice.
The "expanded" style enforced by the aforementioned prior change is
still the default, meaning that users won't see any change from this
patch unless they wish to change the toolbar style by modifying the
ns-toolbar-style parameter.
This is my first time interacting with the Emacs codebase, my first time
meaningfully interacting with Objective C, and my first time submitting
any patch via email, so hopefully I didn't make any egregious mistakes!
Please let me know if I did anything wrong or if there's anything I need
to adjust!
In GNU Emacs 31.0.50 (build 37, aarch64-apple-darwin25.2.0, NS
appkit-2685.30 Version 26.2 (Build 25C56)) of 2026-01-31 built on
Mac.powerhub
Repository revision: 87dfb040b08adf22cea41115adaa913997c04437
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2685
System Description: macOS 26.2
Configured using:
'configure --without-all --with-gnutls --with-modules --with-threads
--with-toolkit-scroll-bars --with-tree-sitter
--enable-link-time-optimization'
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=emacs-ns-toolbar-style.patch
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index bdd79528cac..b43fbec3119 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2455,6 +2455,21 @@ Management Parameters
of both to match the Emacs background color.
@end table
+@vindex ns-toolbar-style@r{, a frame parameter}
+@item ns-toolbar-style
+Only available on macOS, sets the style of the toolbar in the macOS
+window title bar.
+If @code{expanded} or @code{nil}, the menubar is positioned under the
+window title on the left side of of the title bar.
+If @code{automatic}, Emacs allows macOS to automatically select
+a toolbar style.
+If @code{preference}, the toolbar will be positioned under the window
+title middle of the title bar.
+If @code{unified}, the toolbar will be positioned on the right side of
+the title bar in line with the window title.
+If @code{unified-compressed}, the toolbar will have a similar appearance
+to the unified layout, except with a smaller toolbar.
+
@node Cursor Parameters
@subsubsection Cursor Parameters
diff --git a/lisp/frame.el b/lisp/frame.el
index 54502837bf6..a277151c9b3 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -84,7 +84,7 @@ frame--special-parameters
"min-width" "minibuffer" "minibuffer-exit" "mouse-color"
"mouse-wheel-frame" "name" "no-accept-focus" "no-focus-on-map"
"no-other-frame" "no-special-glyphs" "ns-appearance"
- "ns-transparent-titlebar" "outer-window-id" "override-redirect"
+ "ns-transparent-titlebar" "ns-toolbar-style" "outer-window-id"
"override-redirect"
"parent-frame" "right-fringe" "right-divider-width" "screen-gamma"
"scroll-bar-background" "scroll-bar-foreground" "scroll-bar-height"
"scroll-bar-width" "shaded" "skip-taskbar" "snap-width" "sticky"
@@ -121,6 +121,8 @@ frame--complete-parameter-value
((eq parameter 'visibility) '("nil" "t" "icon"))
((memq parameter '(ns-appearance background-mode))
'("dark" "light"))
+ ((memq parameter '(ns-toolbar-style toolbar-style))
+ '("automatic" "expanded" "preference" "unified" "unified-compact"))
((eq parameter 'font-backend)
'("x" "xft" "xfthb" "ftcr" "ftcrhb" "gdi"
"uniscribe" "harfbuzz"))
diff --git a/src/frame.c b/src/frame.c
index d197e4d5351..4b5d200a9bc 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1211,6 +1211,7 @@ make_frame (bool mini_p)
#ifdef NS_IMPL_COCOA
f->ns_appearance = ns_appearance_system_default;
f->ns_transparent_titlebar = false;
+ f->ns_toolbar_style = ns_toolbar_style_automatic;
#endif
#endif
f->select_mini_window_flag = false;
@@ -4848,6 +4849,7 @@ DEFUN ("frame-scale-factor", Fframe_scale_factor,
Sframe_scale_factor,
#ifdef NS_IMPL_COCOA
{"ns-appearance", SYMBOL_INDEX (Qns_appearance)},
{"ns-transparent-titlebar", SYMBOL_INDEX (Qns_transparent_titlebar)},
+ {"ns-toolbar-style", SYMBOL_INDEX (Qns_toolbar_style)},
#endif
};
@@ -7281,6 +7283,7 @@ syms_of_frame (void)
#ifdef NS_IMPL_COCOA
DEFSYM (Qns_appearance, "ns-appearance");
DEFSYM (Qns_transparent_titlebar, "ns-transparent-titlebar");
+ DEFSYM (Qns_toolbar_style, "ns-toolbar-style");
#endif
DEFSYM (Qalpha, "alpha");
diff --git a/src/frame.h b/src/frame.h
index 091b112e8b9..e6ba3029c83 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -73,6 +73,15 @@ #define EMACS_FRAME_H
ns_appearance_aqua,
ns_appearance_vibrant_dark
};
+
+enum ns_toolbar_style_type
+ {
+ ns_toolbar_style_automatic,
+ ns_toolbar_style_expanded,
+ ns_toolbar_style_preference,
+ ns_toolbar_style_unified,
+ ns_toolbar_style_unified_compact
+ };
#endif
#endif /* HAVE_WINDOW_SYSTEM */
@@ -736,6 +745,7 @@ #define EMACS_FRAME_H
/* NSAppearance theme used on this frame. */
enum ns_appearance_type ns_appearance;
bool_bf ns_transparent_titlebar;
+ enum ns_toolbar_style_type ns_toolbar_style;
#endif
#ifdef HAVE_TEXT_CONVERSION
@@ -1257,6 +1267,7 @@ #define FRAME_TOOLTIP_P(f) ((f)->tooltip)
#ifdef NS_IMPL_COCOA
#define FRAME_NS_APPEARANCE(f) ((f)->ns_appearance)
#define FRAME_NS_TRANSPARENT_TITLEBAR(f) ((f)->ns_transparent_titlebar)
+#define FRAME_NS_TOOLBAR_STYLE(f) ((f)->ns_toolbar_style)
#endif
#else /* not HAVE_WINDOW_SYSTEM */
#define FRAME_OVERRIDE_REDIRECT(f) ((void) (f), 0)
diff --git a/src/nsfns.m b/src/nsfns.m
index cf685630ab7..1efbb1590da 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1111,6 +1111,7 @@ Turn the input menu (an NSMenu) into a lisp list
for tracking on lisp side.
#ifdef NS_IMPL_COCOA
ns_set_appearance,
ns_set_transparent_titlebar,
+ ns_set_toolbar_style,
#endif
};
@@ -1416,6 +1417,12 @@ Turn the input menu (an NSMenu) into a lisp list
for tracking on lisp side.
FRAME_NS_TRANSPARENT_TITLEBAR (f) = !NILP (tem) && !EQ (tem, Qunbound);
store_frame_param (f, Qns_transparent_titlebar,
FRAME_NS_TRANSPARENT_TITLEBAR (f) ? Qt : Qnil);
+
+ tem = gui_display_get_arg (dpyinfo, parms, Qns_toolbar_style,
+ NULL, NULL, RES_TYPE_SYMBOL);
+ ns_set_toolbar_style_1 (f, tem);
+ store_frame_param (f, Qns_toolbar_style,
+ (!NILP (tem) && !EQ (tem, Qunbound)) ? tem : Qnil);
#endif
parent_frame = gui_display_get_arg (dpyinfo, parms, Qparent_frame, NULL,
NULL,
@@ -4023,6 +4030,11 @@ - (Lisp_Object)lispString
DEFSYM (Qicon_title_format, "icon-title-format");
DEFSYM (Qdark, "dark");
DEFSYM (Qlight, "light");
+ DEFSYM (Qautomatic, "automatic");
+ DEFSYM (Qexpanded, "expanded");
+ DEFSYM (Qpreference, "preference");
+ DEFSYM (Qunified, "unified");
+ DEFSYM (QunifiedCompact, "unified-compact");
DEFVAR_LISP ("ns-icon-type-alist", Vns_icon_type_alist,
doc: /* Alist of elements (REGEXP . IMAGE) for images of icons
associated to frames.
diff --git a/src/nsterm.h b/src/nsterm.h
index 7c1ee4cf535..7d1222341a6 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -1242,6 +1242,9 @@ #define NSAPP_DATA2_RUNFILEDIALOG 11
extern void ns_set_transparent_titlebar (struct frame *f,
Lisp_Object new_value,
Lisp_Object old_value);
+extern void ns_set_toolbar_style_1 (struct frame *f, Lisp_Object
new_value);
+extern void ns_set_toolbar_style (struct frame *f, Lisp_Object new_value,
+ Lisp_Object old_value);
#endif
extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timespec *timeout,
diff --git a/src/nsterm.m b/src/nsterm.m
index c852b70be74..7920f9d1e2d 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2028,6 +2028,59 @@ Hide the window (X11 semantics)
}
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 101000 */
}
+
+static NSWindowToolbarStyle
+ns_get_toolbar_style(enum ns_toolbar_style_type requested_toolbar_style) {
+ switch (requested_toolbar_style) {
+ case ns_toolbar_style_automatic:
+ return NSWindowToolbarStyleAutomatic;
+ case ns_toolbar_style_expanded:
+ return NSWindowToolbarStyleExpanded;
+ case ns_toolbar_style_preference:
+ return NSWindowToolbarStylePreference;
+ case ns_toolbar_style_unified:
+ return NSWindowToolbarStyleUnified;
+ case ns_toolbar_style_unified_compact:
+ return NSWindowToolbarStyleUnifiedCompact;
+ default:
+ return NSWindowToolbarStyleAutomatic;
+ }
+}
+
+void
+ns_set_toolbar_style_1 (struct frame *f, Lisp_Object new_value)
+{
+ if (EQ (new_value, Qautomatic))
+ FRAME_NS_TOOLBAR_STYLE (f) = ns_toolbar_style_automatic;
+ else if (EQ (new_value, Qexpanded))
+ FRAME_NS_TOOLBAR_STYLE (f) = ns_toolbar_style_expanded;
+ else if (EQ (new_value, Qpreference))
+ FRAME_NS_TOOLBAR_STYLE (f) = ns_toolbar_style_preference;
+ else if (EQ (new_value, Qunified))
+ FRAME_NS_TOOLBAR_STYLE (f) = ns_toolbar_style_unified;
+ else if (EQ (new_value, QunifiedCompact))
+ FRAME_NS_TOOLBAR_STYLE (f) = ns_toolbar_style_unified_compact;
+ else
+ FRAME_NS_TOOLBAR_STYLE (f) = ns_toolbar_style_expanded;
+}
+
+void
+ns_set_toolbar_style (struct frame *f, Lisp_Object new_value,
Lisp_Object old_value)
+{
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
+ EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f);
+ EmacsWindow *window = (EmacsWindow *)[view window];
+
+ NSTRACE ("ns_set_toolbar_style");
+
+ if (NSAppKitVersionNumber < NSAppKitVersionNumber11_0)
+ return;
+
+ ns_set_toolbar_style_1 (f, new_value);
+
+ [window setToolbarStyle: ns_get_toolbar_style(FRAME_NS_TOOLBAR_STYLE
(f))];
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 110000 */
+}
#endif /* NS_IMPL_COCOA */
static void
@@ -9619,12 +9672,13 @@ - (instancetype) initWithEmacsFrame: (struct
frame *) f
[self setTabbingMode:NSWindowTabbingModeDisallowed];
#endif
/* Always show the toolbar below the window title. This is needed
- on Mac OS 11+ where the toolbar style is decided by the system
- (which is unpredictable) and the newfangled "compact" toolbar
- may be chosen (which is undesirable). */
+ on Mac OS 11+ where the toolbar style is decided by the system
+ (which is unpredictable) and the newfangled "compact" toolbar
+ may be chosen (which is undesirable). */
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
- if ([self respondsToSelector:@selector(setToolbarStyle:)])
- [self setToolbarStyle: NSWindowToolbarStyleExpanded];
+ if ([self respondsToSelector:@selector(setToolbarStyle:)]) {
+ [self setToolbarStyle: ns_get_toolbar_style(FRAME_NS_TOOLBAR_STYLE (f))];
+ }
#endif
}
--=-=-=--
opensauce04@HIDDEN:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#80307; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.