unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: "Paul W. Rankin" <pwr@bydasein.com>
Cc: emacs-devel@gnu.org
Subject: Re: src/nsterm.m: fix window tabbing on macOS
Date: Wed, 26 May 2021 20:56:19 +0100	[thread overview]
Message-ID: <YK6n4x8EI6NscyyD@idiocy.org> (raw)
In-Reply-To: <4cf0b73bcefc7d159881d368b3a4b7f5@purelymail.com>

On Sun, May 16, 2021 at 07:16:54PM +1000, Paul W. Rankin wrote:
> On 2021-05-14 07:05, Alan Third wrote:
> > On Thu, May 13, 2021 at 03:46:54PM +1000, Paul W. Rankin via Emacs
> > development discussions. wrote:
> > > On 2021-05-13 07:23, Alan Third wrote:
> > > You're right and I can't find another macOS app with a tab bar that
> > > behaves
> > > the way Emacs.app does, so I gotta assume there is something somewhere
> > > overriding the Cocoa window manager behaviour. But I'm really only
> > > qualified
> > > to guess; I looked through nsterm.m and changed a few suspected BOOL
> > > values
> > > and recompiled a few times but nothing had an effect on the hidden
> > > tab bar.
> > > 
> > > Relatedly, tool-bar-mode is in the same boat; hidden in full screen,
> > > but
> > > probably shouldn't be.
> > 
> > Search in nsterm.m for "autohide", there are a couple of places where
> > hiding various bits and bobs is done, all related to fullscreen
> > afaict.
> > 
> > I'm not on a Mac just now or I'd try removing them all to see what it
> > does.
> 
> Looks like you're on the money!
> 
> I've attached two patches: 0001 is to remove the explicit setting of
> NSWindowTabbingModeDisallowed;

If you write up a wee NEWS entry, I'll be happy to push this change to
master and we can see is anyone shouts. :)

Please make sure to mention where to go to turn off tabbing.

> 0002 allows visibility of the toolbar and tab
> bar in fullscreen (screenshot attached), but reliably causes a segmentation
> fault with the following steps:
> 
> 1. System Preferences > Dock > Prefer tabs... [Always]
> 2. $ emacs -Q
> 3. M-x toggle-frame-full
> 4. M-x make-frame
> 5. M-x delete-frame
> 
> Attached crash.log.
> 
> Interestingly, calling delete-other-frames does not trigger a crash and when
> in windowed (non-fullscreen) a crash is only triggered with the following:
> 
> 1. System Preferences > Dock > Prefer tabs... [Always]
> 2. $ emacs -Q
> 3. M-x make-frame
> 4. M-x make-frame
> 5. click close background tab
> 6. wait for animation to finish
> 7. click close foreground tab

Hmm... My money is on something being accessed after being released...
It reminds me of some relatively recent fix we made, but I can't for
the life of me think what.

Anyway, I'm discussing with Andrii in another bug thread about
removing the pause that's built into fullscreen transitions so we may
want to wait for that to be sorted before we look further into crashes
that happen in the same place.

> There are three positions someone could take:
> 
> 1. wants tabs in all macOS apps including Emacs.app
> 2. does not want tabs in any macOS apps including Emacs.app
> 3. wants tabs in all other macOS except for Emacs.app
> 
> Anyone in categories 1 and 2 will be covered by the option in System
> Preferences. Given that all I think we're doing here is removing old barrier
> code to have Emacs function with an OS's native window manager, anyone in
> the third category would be putting the onus on themselves to write code for
> additional functionality.

Yes, I'm happy enough with this.
-- 
Alan Third



  reply	other threads:[~2021-05-26 19:56 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08  9:26 src/nsterm.m: fix window tabbing on macOS Paul W. Rankin via Emacs development discussions.
2021-05-08 11:21 ` Alan Third
2021-05-08 12:27   ` Paul W. Rankin via Emacs development discussions.
2021-05-08 12:35     ` Paul W. Rankin via Emacs development discussions.
2021-05-10 19:53     ` Alan Third
2021-05-11  5:45       ` Paul W. Rankin via Emacs development discussions.
2021-05-11 19:20         ` chad
2021-05-12  9:47           ` Paul W. Rankin via Emacs development discussions.
2021-05-12 21:23         ` Alan Third
2021-05-13  5:46           ` Paul W. Rankin via Emacs development discussions.
2021-05-13 21:05             ` Alan Third
2021-05-16  9:16               ` Paul W. Rankin via Emacs development discussions.
2021-05-26 19:56                 ` Alan Third [this message]
2021-05-27 11:06                   ` Andrii Kolomoiets
2021-05-28  8:26                     ` martin rudalics
2021-05-28  8:28                       ` Paul W. Rankin via Emacs development discussions.
2021-05-28  8:36                         ` martin rudalics
2021-05-28  8:54                           ` Alan Third
2021-06-06  4:09                             ` Paul W. Rankin via Emacs development discussions.
2021-06-06  7:43                               ` martin rudalics
2021-05-28  9:07                           ` Andrii Kolomoiets
2021-05-28  9:21                             ` martin rudalics
2021-05-28  9:37                               ` Paul W. Rankin via Emacs development discussions.
2021-05-28  9:51                                 ` martin rudalics
2021-05-28 14:33                                   ` Paul W. Rankin via Emacs development discussions.
2021-05-28 20:52                                     ` Andrii Kolomoiets
2021-06-05 20:58                   ` Alan Third
2021-06-06  4:01                     ` Paul W. Rankin via Emacs development discussions.
2021-06-06  6:14                       ` Eli Zaretskii
2021-06-06  6:48                         ` Paul W. Rankin via Emacs development discussions.
2021-06-06  9:13                           ` Alan Third
     [not found]                             ` <8CCF969D-32AF-4542-8838-21DF4AA45523@yasufuku.dev>
2021-06-06 11:36                               ` Alan Third
2021-06-06 12:19                                 ` Paul W. Rankin via Emacs development discussions.
2021-06-06 18:56                                   ` Alan Third
2021-06-07  0:27                                     ` Paul W. Rankin via Emacs development discussions.
2021-06-07 22:13                                       ` Alan Third
2021-06-08  7:32                                         ` Paul W. Rankin via Emacs development discussions.
2021-06-08  8:59                                           ` Eli Zaretskii
2021-06-09  8:35                                         ` martin rudalics
2021-06-09  8:48                                           ` Alan Third
2021-06-09 12:20                                             ` martin rudalics
2021-06-09 12:29                                               ` Alan Third
     [not found] <65f1-60bcfd80-157-23301c40@168015757>
2021-06-07  0:11 ` Paul W. Rankin via Emacs development discussions.
2021-06-07 21:57   ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YK6n4x8EI6NscyyD@idiocy.org \
    --to=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    --cc=pwr@bydasein.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).