From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#3303: delete-frame raises old (invisible) frame Date: Mon, 18 May 2009 16:12:32 -0400 Message-ID: References: <2C87549A-2553-4477-BF77-6258A1CC32BE@gmail.com> <6A510E91-6262-44CF-AA62-315DECB52EF6@gmail.com> <90E34251-C034-4169-91FE-22A28C94901F@gmail.com> <73A0DAB1-9D16-4E35-A9F7-E9E4CCEACC50@gmail.com> Reply-To: Stefan Monnier , 3303@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1242678817 14965 80.91.229.12 (18 May 2009 20:33:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 May 2009 20:33:37 +0000 (UTC) Cc: 3303@emacsbugs.donarmstrong.com, Adrian Robert To: David Reitter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 18 22:33:30 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M69Wa-0001ni-BY for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 May 2009 22:33:29 +0200 Original-Received: from localhost ([127.0.0.1]:55847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M69WZ-0001Cw-RQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 May 2009 16:33:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M69VF-0000NW-Mo for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 16:32:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M69VA-0000JM-W0 for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 16:32:05 -0400 Original-Received: from [199.232.76.173] (port=37244 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M69VA-0000JC-KY for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 16:32:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:51405) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M69V9-0004rG-Tf for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 16:32:00 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4IKVuwY016762; Mon, 18 May 2009 13:31:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n4IKK5Sh012848; Mon, 18 May 2009 13:20:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 18 May 2009 20:20:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3303 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3303-submit@emacsbugs.donarmstrong.com id=B3303.124267756111179 (code B ref 3303); Mon, 18 May 2009 20:20:05 +0000 Original-Received: (at 3303) by emacsbugs.donarmstrong.com; 18 May 2009 20:12:41 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4IKCbqw011161 for <3303@emacsbugs.donarmstrong.com>; Mon, 18 May 2009 13:12:39 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqwFAO9dEUpMCovv/2dsb2JhbACBT80khAEFhWo X-IronPort-AV: E=Sophos;i="4.41,211,1241409600"; d="scan'208";a="38738372" Original-Received: from 76-10-139-239.dsl.teksavvy.com (HELO ceviche.home) ([76.10.139.239]) by ironport2-out.teksavvy.com with ESMTP; 18 May 2009 16:12:32 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 4B6DBB4136; Mon, 18 May 2009 16:12:32 -0400 (EDT) In-Reply-To: (David Reitter's message of "Mon, 18 May 2009 11:08:39 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 18 May 2009 16:32:05 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:27989 Archived-At: >>> [ 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);