From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#59790: 30.0.50; ns-use-native-fullscreen is not respected for first use of initial-frame-alist Date: Fri, 22 Nov 2024 17:12:56 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000020e80506278a33a7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2328"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sean@farley.io, 59790@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 23 02:15:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tEekC-0000Uo-1j for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Nov 2024 02:15:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEejp-0006rU-1l; Fri, 22 Nov 2024 20:15:05 -0500 Original-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 ) id 1tEejn-0006pT-De for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2024 20:15:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tEejn-0005xH-3E for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2024 20:15:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:References:In-Reply-To:From:Mime-Version:To:Subject; bh=tomgJd8zajITnkbdGI5WhzHnW9YdlQv4B+G1Jlnlc9M=; b=Vk+GuR1SCX3N+QUppCVuCsLuwi9uLqddC4ipgvujwTjbHFW3ViFSDYFCNQF62GPapH4AZRqqHsjrCGXXNqTFUpx9rFvpv+om4d9ywC0gs87o3q2ZgG+YmuIgVDzyHgUo4+qpTWRPe8cMnSWfL1V2Jo3Jm6ZHXYV1alrPQg+9kVcw+U4UDLQmzZ6BA0qxY5Uk34bpOPWKfTm+KfwMQVVvDR0ap5plQ6c43UZcQKClAoGHJrj2tPrY5Ba4ivuodLob1HjRBChGGTj+CTs+DIu2GhOSCSLxzeOH5bt3NSirrxZCdCpFdeJRLgSmglMtcUyftHKPO5C7PKUtZM3f1PTfCA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tEejl-0005EA-UE for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2024 20:15:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Nov 2024 01:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59790 X-GNU-PR-Package: emacs Original-Received: via spool by 59790-submit@debbugs.gnu.org id=B59790.173232444619994 (code B ref 59790); Sat, 23 Nov 2024 01:15:01 +0000 Original-Received: (at 59790) by debbugs.gnu.org; 23 Nov 2024 01:14:06 +0000 Original-Received: from localhost ([127.0.0.1]:56087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEeis-0005CN-0f for submit@debbugs.gnu.org; Fri, 22 Nov 2024 20:14:06 -0500 Original-Received: from mail-lj1-f179.google.com ([209.85.208.179]:50338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEeip-0005Bj-IF for 59790@debbugs.gnu.org; Fri, 22 Nov 2024 20:14:04 -0500 Original-Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2ffb0bbe9c8so3767481fa.0 for <59790@debbugs.gnu.org>; Fri, 22 Nov 2024 17:14:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732324377; x=1732929177; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:references:in-reply-to:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tomgJd8zajITnkbdGI5WhzHnW9YdlQv4B+G1Jlnlc9M=; b=M7s3BcKeN3WyxeLRkf4quFcur7sSob5EEmgqrUZyaWFO/34FgnJkpOZTMCJYEMZtpt +0VjJog8eSynxuo5CJoRPoud2XcKcvZ6eZunKMqO0O95KyOZtW01J532s34cFD2ZURVK /e9fxkWDcCwwZLxeswHyKhy9HuvqoZjCe6JCTV3JuA1QHoPCvmd20fzR6xVJPi2Bt1gg rDo3iLiTHzPp5PtsRGgCW7UYveYwRlEnlJ+qMf0dduXClX1bYzybyy6KMpbVnLpAH1xz x29wbfqJ/aOaGAC27v/O0dZ2lA2KMbxSC3vMjytPmxG3Z6OXr2Guhbo64CmCf51YOifQ +Pag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732324377; x=1732929177; h=cc:to:subject:message-id:date:references:in-reply-to:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tomgJd8zajITnkbdGI5WhzHnW9YdlQv4B+G1Jlnlc9M=; b=s+0ABCJaVCB7WNCvdmOwKBdO6fKoK1pFsHnKm5E92K4UvxFPyC2pIPnV/y6NLubzHs G7+qJPOlJWlBd7gaB83Cfwr6gtUtnRa8HB983k92bwq0eQSkaG/PEE8nQwcycJ/SVjhB QeLIGWCkJVcA9jlOEYwftHHNM8B4Sp5st0g3NLZYuw6WjoJJ+aIyIIsosyV8YBdpfVgP vY9rkJrkCj19yI79XGkoiWklOkuLbavZZeGGoFfnSzFMLrbRvBA0mFmCWx6QPI7/4vhg Xu2ZMhTdjZz6CQcyWHQ7h+DRz/rYnQVDvPIQYhruFjzSGD8e/+meTAu0BCUdJT7FR2dc DjNg== X-Forwarded-Encrypted: i=1; AJvYcCXqaW9Hlt14DR06fAKAvwoeDBdr4Y3dGa/5zmAB4h7whN+ivfonZZORSTVHARacJVOFnxOD+Q==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxXl564ihrBB8RgkOzf/LbNCjdKrUpJyiT9hhTdfAVyBejWU5th Lu1/BRG2npFLZ9bssG0iXncEoamxY6QfIRVcj1/sDve3Vp6UblAQW1O5sCfY2l5NMLru6K+U/MN vobWPzqyFMIagtJzJJX3giUXpYWaeaQ== X-Gm-Gg: ASbGncsK09kpmj5PW4eShHKlilg8XTClLN+qhM6xvy1TA5Q3vLU1gofBsnr9pJR/qEn FP7uEI6z7dVDL82QNcxvKyf0FpW3jMAL5IL6/3jWJFXi66WM4fPnYF8Q= X-Google-Smtp-Source: AGHT+IFlSv3NETm/qnsowzlp1+A/Cw2BYWa5rQ8a4xNGt9/tKyZaqMDK1yehsDIZXKbY8JOwFbpgShU9aVgMWZdfrp0= X-Received: by 2002:a05:651c:884:b0:2fb:4b40:1e15 with SMTP id 38308e7fff4ca-2ffa71ce15dmr26335011fa.41.1732324377026; Fri, 22 Nov 2024 17:12:57 -0800 (PST) Original-Received: from 649336022844 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Nov 2024 17:12:56 -0800 X-Mailer: Superhuman Desktop (2024-11-22T20:05:55Z) X-Superhuman-Draft-ID: draft0076990dad7931e2 In-Reply-To: X-Superhuman-ID: m3th6zfk.fa407a4a-1740-4a49-b956-e6142f3a0c08 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295804 Archived-At: --00000000000020e80506278a33a7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 20, 2024 at 1:27 PM, Alan Third wrote: > On Sun, Nov 17, 2024 at 12:00:07AM -0500, Aaron Jensen wrote: > > =E2=80=8BThe bugged behavior is that `ns-use-native-fullscreen' set to ni= l 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 variab= le > 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. > > The patch looks good here. The only thing is I get this printed to the > console: > > 2024-11-20 21:11:36.609 emacs[18867:241457] ERROR: Can't have a toolbar i= n > a window with as it's borderview > > I don't think I've ever seen NextStep explicitly mentioned in macOS code > before, other than the "NS" prefix. > > I'm going to hazard a guess that the first if at the top of createToolbar > needs another test for when we're in non-native fullscreen or something. > > Native fullscreen displays the toolbar, non-native doesn't because it use= s > the borderless stylemask. Perhaps a check on the stylemask would be enoug= h > to cover both this and undecorated. > I tried this in createToolbar and I still get the error. I don't know if the styleMask isn't set yet or if it's somehow using the toolbar from the previous window? Seems odd. I haven't played with it too much, but I just wanted to let you know that this didn't appear to work in case you were planning on taking a look at some point. if ([[view window] styleMask] & NSWindowStyleMaskBorderless) return; Thanks, Aaron --00000000000020e80506278a33a7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Nov 20, 2024 at 1:27 PM, Alan Third <alan@idiocy.org> wrote:

On Sun, Nov 17, 2024 at 12:00:07AM -0500, Aaron J= ensen wrote:

=E2=80=8BThe 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.

The patch looks good here. The only thing is I get this printed to the console:

2024-11-20 21:11:36.609 emacs[18867:241457] ERROR: Can't have a toolbar= in a window with <NSNextStepFrame: 0x7f8db350c7e0> as it's borde= rview

I don't think I've ever seen NextStep explicitly mentioned in macOS code before, other than the "NS" prefix.

I'm going to hazard a guess that the first if at the top of createToolbar needs another test for when we're in non-native fullscreen or something.

Native fullscreen displays the toolbar, non-native doesn't because it uses the borderless stylemask. Perhaps a check on the stylemask would be enough to cover both this and undecorated.


I tried this in createT= oolbar and I still get the error. I don't know if the styleMask isn'= ;t set yet or if it's somehow using the toolbar from the previous windo= w? Seems odd. I haven't played with it too much, but I just wanted to l= et you know that this didn't appear to work in case you were planning o= n taking a look at some point.

if ([[vie= w window] styleMask] & NSWindowStyleMaskBorderless)
=C2= =A0 return;

Thanks,

Aaron

--00000000000020e80506278a33a7--