unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Naofumi Yasufuku <naofumi@yasufuku.dev>
Cc: Eli Zaretskii <eliz@gnu.org>, "Paul W. Rankin" <pwr@bydasein.com>,
	emacs-devel@gnu.org
Subject: Re: src/nsterm.m: fix window tabbing on macOS
Date: Sun, 6 Jun 2021 12:36:58 +0100	[thread overview]
Message-ID: <YLyzWlYzFIadodq8@breton.holly.idiocy.org> (raw)
In-Reply-To: <8CCF969D-32AF-4542-8838-21DF4AA45523@yasufuku.dev>

On Sun, Jun 06, 2021 at 07:07:53PM +0900, Naofumi Yasufuku wrote:
> 
> > On Jun 6, 2021, at 18:13, Alan Third <alan@idiocy.org> wrote:
> > 
> > On Sun, Jun 06, 2021 at 04:48:32PM +1000, Paul W. Rankin wrote:
> >> 
> >> No problemo. Revised patch attached.
> > 
> > Thanks. I've pushed it to master.
> 
> I found the following issues with this macOS native tab commit.
> Does anyone else encounter the same problems?
> 
> 1) Frame height increases (even if frame-inhibit-implied-resize is t).
>   attachment:
>     01_macOS-tab-issue-increases-height.gif
>     01_macOS-tab-issue-increases-height-2.gif … (sets frame-inhibit-implied-resize t)

Strangely I don't see this. The frame stays the same height...

> 2) New tab name is ‘emacs’ instead of buffer name.
>     (even if C-x 5 C-f `find-file-other-frame’)
>   attachment:
>     02_macOS-tab-issue-odd-tab-name.gif

It turns out that when multiple NSViews are put into one NSWindow
using tabs, AppKit doesn't bother telling all the views to update
themselves when the window changes, it appears to only message the
currently visible one. This is a problem.

The tab name issue can be sorted with this change:

modified   src/nsfns.m
@@ -407,6 +407,9 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side.
   if (! [[[view window] title] isEqualToString: str])
     [[view window] setTitle: str];
 
+  if ([[view window] tab])
+    [[[view window] tab] setTitle: str];
+
   if (STRINGP (f->icon_name))
     str = [NSString stringWithLispString: f->icon_name];
 
but the overall window title ends up stuck with something nonsensical.
It's even when worse if you resize the frame manually with the mouse.

I don't know how to fix that.

> 3) Tabs are not shown in fullscreen.
>   attachment:
>     03_macOS-tab-fullscreen-expected-textedit.gif. .. e.g. macOS Test Edit app
>     03_macOS-tab-issue-fullscreen-emacs.gif

Works as expected here. Since the window chrome isn't shown in
fullscreen mode, the tab bar isn't shown.

> 4) Doom modeline is not get focused when tab is closed.
>   This could be a ‘doom-modeline’ problem.
>   attachment:
>     04_macOS-tab-issue-doom-modeline-focus.gif

That looks like it's probably related to some old bug we have open
where in certain circumstances the frame isn't shown as being the
selected frame, despite being the key frame as far as AppKit is
concerned.

> 5) Native tabbing doesn’t work with (ns-transparent-titlebar . t) frame parameter.
>     This could be a limitation of macOS, and expected behavior.

At a guess you'll need to set all frames to have a transparent
titlebar, but perhaps there's more to it than that...
-- 
Alan Third



  parent reply	other threads:[~2021-06-06 11:36 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
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 [this message]
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=YLyzWlYzFIadodq8@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=naofumi@yasufuku.dev \
    --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).