GNU bug report logs - #4566
23, NS: frames re-appear when app switching

Previous Next

Package: emacs;

Reported by: David Reitter <david.reitter <at> gmail.com>

Date: Sun, 27 Sep 2009 15:55:06 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4566 in the body.
You can then email your comments to 4566 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, owner <at> emacsbugs.donarmstrong.com:
bug#4566; Package ns. (Sun, 27 Sep 2009 15:55:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Reitter <david.reitter <at> gmail.com>:
New bug report received and forwarded. Copy sent to owner <at> emacsbugs.donarmstrong.com. (Sun, 27 Sep 2009 15:55:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: David Reitter <david.reitter <at> gmail.com>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: 23, NS: frames re-appear when app switching
Date: Sun, 27 Sep 2009 11:50:40 -0400
package: ns

When starting up the NS port (trunk, on OS X 10.6.1), and then hiding  
the frame:

(make-frame-invisible nil t)

and then switching away and back to Emacs (Command-Tab, Command-Tab),   
the frame magically re-appears.
It shouldn't do that (it's non-standard).

What seems to happen is that the frame is raised (in front of desktop  
level) by the system before windowDidBecomeKey: is received.

I tried keeping the frame hidden in this case, for example via a call  
to x_make_frame_invisible (emacsframe) in windowDidBecomeKey:, but the  
result was that the menus become non-responsive (menuDown: isn't  
called at all!) until some frame is made visible.

A fix or a pointer to what could be wrong with the menu issue would  
probably help me produce a fix.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, owner <at> emacsbugs.donarmstrong.com:
bug#4566; Package ns. (Sat, 17 Oct 2009 12:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adrian Robert <adrian.b.robert <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to owner <at> emacsbugs.donarmstrong.com. (Sat, 17 Oct 2009 12:30:04 GMT) Full text and rfc822 format available.

Message #10 received at 4566 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: 4566 <at> debbugs.gnu.org
Cc: David Reitter <david.reitter <at> gmail.com>
Subject: Re: 23, NS: frames re-appear when app switching
Date: Sat, 17 Oct 2009 08:23:23 -0400
set severity 'minor'
stop


http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4566

They should probably stay invisible, but OTOH I'm not sure how much  
user's expectations will be upset by this as I can't think of another  
Mac app that lets users make windows "invisible".  On what basis are  
you saying it is "non-standard"?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, owner <at> emacsbugs.donarmstrong.com:
bug#4566; Package ns. (Sat, 17 Oct 2009 12:35:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Reitter <david.reitter <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to owner <at> emacsbugs.donarmstrong.com. (Sat, 17 Oct 2009 12:35:04 GMT) Full text and rfc822 format available.

Message #15 received at 4566 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: David Reitter <david.reitter <at> gmail.com>
To: Adrian Robert <adrian.b.robert <at> gmail.com>
Cc: 4566 <at> debbugs.gnu.org
Subject: Re: 23, NS: frames re-appear when app switching
Date: Sat, 17 Oct 2009 08:27:03 -0400
On Oct 17, 2009, at 8:23 AM, Adrian Robert wrote:
>
> They should probably stay invisible, but OTOH I'm not sure how much  
> user's expectations will be upset by this as I can't think of  
> another Mac app that lets users make windows "invisible".  On what  
> basis are you saying it is "non-standard"?

Every other app lets users delete all frames, but not so Emacs.   
Therefore, hiding a frame (or the last frame) serves as a proxy for  
deleting.  That's what makes the present behavior unexpected.

- D



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, owner <at> emacsbugs.donarmstrong.com:
bug#4566; Package ns. (Sat, 17 Oct 2009 12:50:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adrian Robert <adrian.b.robert <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to owner <at> emacsbugs.donarmstrong.com. (Sat, 17 Oct 2009 12:50:11 GMT) Full text and rfc822 format available.

Message #20 received at 4566 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: David Reitter <david.reitter <at> gmail.com>
Cc: 4566 <at> debbugs.gnu.org
Subject: Re: 23, NS: frames re-appear when app switching
Date: Sat, 17 Oct 2009 08:41:34 -0400
On Oct 17, 2009, at 8:27 AM, David Reitter wrote:

> On Oct 17, 2009, at 8:23 AM, Adrian Robert wrote:
>>
>> They should probably stay invisible, but OTOH I'm not sure how much  
>> user's expectations will be upset by this as I can't think of  
>> another Mac app that lets users make windows "invisible".  On what  
>> basis are you saying it is "non-standard"?
>
> Every other app lets users delete all frames, but not so Emacs.   
> Therefore, hiding a frame (or the last frame) serves as a proxy for  
> deleting.  That's what makes the present behavior unexpected.

I dunno, that sounds a bit like a hack.  Maybe the fix is to let emacs  
exist without a frame on this platform, but if that's too much of a  
break with OTHER platforms (and it might be, at least for  
implementation reasons), then perhaps it should just be lived with.  I  
don't like the idea of supporting invisible frames under NS _at all_.   
(In fact, whoever came up with that feature (which is not standard on  
ANY platform, while all support iconification or something similar) to  
begin with should be  questioned intensively by the police, but that's  
another issue.. ;-)




bug reassigned from package 'ns' to 'emacs,ns'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Mon, 30 Nov 2009 21:55:12 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Mon, 30 Nov 2009 21:55:13 GMT) Full text and rfc822 format available.

Severity set to 'wishlist' from 'minor' Request was from Alan Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Mon, 25 Sep 2017 16:01:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4566; Package emacs. (Sat, 04 Dec 2021 21:13:01 GMT) Full text and rfc822 format available.

Message #29 received at 4566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: David Reitter <david.reitter <at> gmail.com>
Cc: Alan Third <alan <at> idiocy.org>, 4566 <at> debbugs.gnu.org
Subject: Re: bug#4566: 23, NS: frames re-appear when app switching
Date: Sat, 04 Dec 2021 22:11:56 +0100
David Reitter <david.reitter <at> gmail.com> writes:

> When starting up the NS port (trunk, on OS X 10.6.1), and then hiding
> the frame:
>
> (make-frame-invisible nil t)
>
> and then switching away and back to Emacs (Command-Tab, Command-Tab),
> the frame magically re-appears.
> It shouldn't do that (it's non-standard).

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

This behaviour is still present in Emacs 29, and it does seem to be
non-standard (i.e., other Macos programs don't seem to do this?)

Perhaps Alan has an opinion here; added to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4566; Package emacs. (Sat, 04 Dec 2021 21:52:01 GMT) Full text and rfc822 format available.

Message #32 received at 4566 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: David Reitter <david.reitter <at> gmail.com>, 4566 <at> debbugs.gnu.org
Subject: Re: bug#4566: 23, NS: frames re-appear when app switching
Date: Sat, 4 Dec 2021 21:51:42 +0000
On Sat, Dec 04, 2021 at 10:11:56PM +0100, Lars Ingebrigtsen wrote:
> David Reitter <david.reitter <at> gmail.com> writes:
> 
> > When starting up the NS port (trunk, on OS X 10.6.1), and then hiding
> > the frame:
> >
> > (make-frame-invisible nil t)
> >
> > and then switching away and back to Emacs (Command-Tab, Command-Tab),
> > the frame magically re-appears.
> > It shouldn't do that (it's non-standard).
> 
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
> 
> This behaviour is still present in Emacs 29, and it does seem to be
> non-standard (i.e., other Macos programs don't seem to do this?)
> 
> Perhaps Alan has an opinion here; added to the CCs.

I don't believe other macOS applications let you make arbitrary
windows "invisible" like Emacs does. Minimising windows and "hiding"
the application work exactly like other macOS apps I've tried.

As far as I can tell we don't do anything particularly unusual. Hidden
windows other than the last selected one don't magically reappear, so
I suspect what we're seeing is macOS bringing the "main" window to the
front when we switch to the application.

We can't resign the main window, afaik. I suppose we could just delete
the windows completely when we make them invisible instead of just,
y'know, making them invisible.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4566; Package emacs. (Sat, 04 Dec 2021 21:56:02 GMT) Full text and rfc822 format available.

Message #35 received at 4566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alan Third <alan <at> idiocy.org>
Cc: David Reitter <david.reitter <at> gmail.com>, 4566 <at> debbugs.gnu.org
Subject: Re: bug#4566: 23, NS: frames re-appear when app switching
Date: Sat, 04 Dec 2021 22:55:09 +0100
Alan Third <alan <at> idiocy.org> writes:

> I don't believe other macOS applications let you make arbitrary
> windows "invisible" like Emacs does. Minimising windows and "hiding"
> the application work exactly like other macOS apps I've tried.

Ah, right.  

> We can't resign the main window, afaik. I suppose we could just delete
> the windows completely when we make them invisible instead of just,
> y'know, making them invisible.

I think that'd be even more unexpected.

Well, then I don't think there's anything to do here, and I'm closing
this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 4566 <at> debbugs.gnu.org and David Reitter <david.reitter <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 04 Dec 2021 21:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4566; Package emacs. (Sat, 04 Dec 2021 22:04:01 GMT) Full text and rfc822 format available.

Message #40 received at 4566 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: David Reitter <david.reitter <at> gmail.com>, 4566 <at> debbugs.gnu.org
Subject: Re: bug#4566: 23, NS: frames re-appear when app switching
Date: Sat, 4 Dec 2021 22:03:30 +0000
On Sat, Dec 04, 2021 at 10:55:09PM +0100, Lars Ingebrigtsen wrote:
> Alan Third <alan <at> idiocy.org> writes:
> 
> > I don't believe other macOS applications let you make arbitrary
> > windows "invisible" like Emacs does. Minimising windows and "hiding"
> > the application work exactly like other macOS apps I've tried.
> 
> Ah, right.  
> 
> > We can't resign the main window, afaik. I suppose we could just delete
> > the windows completely when we make them invisible instead of just,
> > y'know, making them invisible.
> 
> I think that'd be even more unexpected.

It may not be as unexpected as you think. macOS windows are made up of
multiple components and when we change between various states, like
switching to fullscreen, we destroy the old NSWindow, create a new one
and then apply the old NSView to it. Maybe not quite in that order. :D

It may be possible to just remove the NSWindow when we make a frame
invisible and hang onto the NSView. It might not be practical, and I'm
not sure if it will really make any difference. I suspect David wanted
to make the frame invisible as a work-around for the bug we fixed
recently where when the last frame was closed the menus and dock icon
were visible but failed to respond.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4566; Package emacs. (Sat, 04 Dec 2021 22:15:02 GMT) Full text and rfc822 format available.

Message #43 received at 4566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alan Third <alan <at> idiocy.org>
Cc: David Reitter <david.reitter <at> gmail.com>, 4566 <at> debbugs.gnu.org
Subject: Re: bug#4566: 23, NS: frames re-appear when app switching
Date: Sat, 04 Dec 2021 23:13:50 +0100
Alan Third <alan <at> idiocy.org> writes:

> I suspect David wanted to make the frame invisible as a work-around
> for the bug we fixed recently where when the last frame was closed the
> menus and dock icon were visible but failed to respond.

Yes, sounds likely.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4566; Package emacs. (Sun, 05 Dec 2021 02:03:02 GMT) Full text and rfc822 format available.

Message #46 received at 4566 <at> debbugs.gnu.org (full text, mbox):

From: David Reitter <david.reitter <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Alan Third <alan <at> idiocy.org>, Win Treese <treese <at> acm.org>,
 4566 <at> debbugs.gnu.org
Subject: Re: bug#4566: 23, NS: frames re-appear when app switching
Date: Sat, 4 Dec 2021 21:02:37 -0500
[Message part 1 (text/plain, inline)]
Yes that is correct. Indeed I created an elaborate workaround.
If that other behavior is fixed, Win might revise that module one day!
(Cc’ed)

On Sat, Dec 4, 2021 at 17:13 Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Alan Third <alan <at> idiocy.org> writes:
>
> > I suspect David wanted to make the frame invisible as a work-around
> > for the bug we fixed recently where when the last frame was closed the
> > menus and dock icon were visible but failed to respond.
>
> Yes, sounds likely.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
-- 
David Reitter, PhD
New York City, NY
+1 (412) 417 0529
www.david-reitter.com
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 Jan 2022 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 113 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.