Subject: bug#71850: macOS (Cocoa) alpha-background

From: Stefan Kangas <[email-masked]>
Date: Wed, 19 Feb 2025 19:57:53 -0600

Jon Rubens <[email-masked]> writes:

>> > The patch seeks to enable the alpha_background frame parameter for
>> > MacOS (and NS). Presently, that frame parameter does nothing on MacOS.
>> > Similar to the alpha frame parameter, this should enable transparency
>> > but not change the transparency of any text.
>
>> Could you please send some instructions for how to test the patch?
>> I'm looking for an easy-to-use recipe that would demonstrate the effect
>> before and after applying this patch.
>
> To test, run emacs with eval:
> emacs -Q --eval="(modify-all-frames-parameters '((alpha-background . 0.5)))"
> compare with changing "alpha" instead:
> emacs -Q --eval="(modify-all-frames-parameters '((alpha . 0.5)))"
> Notice that the text does not become transparent when alpha-background is used.
> Test with themes. Larger font size makes the effect more obvious.
>
>> Also, is there anything else you could add regarding the use case here?
> Emacs already has the alpha-background frame parameter. This patch
> enables the feature for MacOS to match X.

Thanks.  Your patch doesn't seem to apply cleanly against latest master:

patching file 'src/macfont.m'
patching file 'src/nsfns.m'
patching file 'src/nsfont.m'
1 out of 1 hunks failed--saving rejects to 'src/nsfont.m.rej'
patching file 'src/nsterm.m'
2 out of 14 hunks failed--saving rejects to 'src/nsterm.m.rej'

Could you please rebase on top of current master and resend the patch as
an attachment, created by:

    git format-patch -1

Please also add a ChangeLog entry for this change as per CONTRIBUTE, if
possible, and I think we need an entry in etc/NEWS.

Thanks in advance.