GNU bug report logs - #3303
delete-frame raises old (invisible) frame

Previous Next

Packages: emacs, ns;

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

Date: Sat, 16 May 2009 01:15:04 UTC

Severity: normal

Merged with 3204

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: David Reitter <david.reitter <at> gmail.com>
Cc: Adrian Robert <adrian.b.robert <at> gmail.com>, 3303 <at> debbugs.gnu.org
Subject: Re: bug#3303: delete-frame raises old (invisible) frame
Date: Mon, 18 May 2009 16:12:32 -0400
>>> [ So, nothing gets focus?  Keyboard events are just dropped on the floor
>>> in such a case?  Sounds odd: it should be easy for Apple to provide
>>> a sensible default behavior without any negative impact.  ]
>> 
>> Yes, KB events only get sent to a focused window, except for menu shortcut
>> invocations.  It might be that in NSDocument-based apps  (which Emacs.app
>> isn't, but would be conceptually similar to if 1- 
>> buffer=1-frame) the NSDocument architecture would autofocus the most
>> recently available doc window, but I guess NeXT/Apple decided not to  make
>> assumptions otherwise about sensible focus-sequencing.

> Precisely for this reason is the patch not sufficient.

I do not understand.

> When there is a hidden frame, and you delete the only other existing frame,
> we end up in a situation where there is no key window to receive the event,
> and all events (including menu items) are simply dropped.

Could you explain concretely why it's a problem.


        Stefan


PS: Another problem I see is that I don't think raise-frame should make
an invisible frame visible.  It's right for iconified frames, but
I don't think it's right for invisible frames.  I.e. a patch like the
one below might be a good change (not for 23.1, tho, obviously).


=== modified file 'src/frame.c'
--- src/frame.c	2009-05-05 14:50:29 +0000
+++ src/frame.c	2009-05-18 20:09:22 +0000
@@ -2020,7 +2020,7 @@
   if (FRAME_TERMCAP_P (f))
     /* On a text-only terminal select FRAME.  */
     Fselect_frame (frame, Qnil);
-  else
+  else if (FRAME_ICONIFIED_P (f))
     /* Do like the documentation says. */
     Fmake_frame_visible (frame);
 






This bug report was last modified 13 years and 288 days ago.

Previous Next


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