From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt McClure Newsgroups: gmane.emacs.help Subject: Re: delete-frame raises other frames Date: Sat, 22 Oct 2016 16:38:05 +0000 Message-ID: References: <83zim63g0r.fsf@gnu.org> <83k2d5ww1x.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1477154342 27145 195.159.176.226 (22 Oct 2016 16:39:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 16:39:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 22 18:38:58 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxzJl-00057y-Ox for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 18:38:45 +0200 Original-Received: from localhost ([::1]:38034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxzJn-0007vP-T7 for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 12:38:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxzJK-0007vG-Ja for help-gnu-emacs@gnu.org; Sat, 22 Oct 2016 12:38:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxzJJ-0005NE-FY for help-gnu-emacs@gnu.org; Sat, 22 Oct 2016 12:38:18 -0400 Original-Received: from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235]:36260) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bxzJJ-0005My-9n for help-gnu-emacs@gnu.org; Sat, 22 Oct 2016 12:38:17 -0400 Original-Received: by mail-qt0-x235.google.com with SMTP id m5so105681587qtb.3 for ; Sat, 22 Oct 2016 09:38:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=d88Y1zdV+ktdPhCFOX0anZv6PjCg6fKTncLGv8SJAs8=; b=jMZmbAICqPUE1GPWf1zFAaj6HGCjqCmV0Syolxy1P0/f7OwlQ38FI99bBs+IDXIl5P StJ37IXMVjrYKNbuN0DVX5zgsYYivLgpBcAXcsN5ebH+bvGo7l7KAUiV6vpAgKZvlg33 HomYh449qBRKa9VEBStvq+PACSEte86x2X010r5/C42UpS+d605By+pCD4lkxbJaSkg5 Z0UwhgjGBCrzyYQNIZvfHpsLp8kvTH+EsZE3OkQ0ofasizDlyxj6QRFfwtlWLB7xTxyw SnqjLZ6I8XqnWS2T0ywIn20HVpFn2zAdsZCl1EvY6MOiWFCDNi0P9BwrTqtZMNUq3OJ2 tPGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=d88Y1zdV+ktdPhCFOX0anZv6PjCg6fKTncLGv8SJAs8=; b=LjO+dDjRRd4TCV0Hooy65X5Cja5GMLPYDIVOrV6/5qwv7ZaurpwSoK8/9frLr00JRY 3Kk/c5oNEHEA50GNmTUCven25+zK2WmmXH5IcjD655HPyYwZyw9ThHTtThhMxbsYY6c4 31vP/GDN6dnkL+w3K6PLUDTZLrLvdWNhEBW1zj6XBYoi4rhkx/dE1uPy6C2YWRPSS3oj R2cDA89JY4s6H9NZzTPidarSlrDJ2PL2IqgusMCSeoINvKAMzzwqM/W7ORRHGd2I/PFx UIAWbTEee/RdJHdWxf+o7DF9ZBql052735BonMZAq9P2BQAeyOrk/GcqX1DKeDmhvXoP JCfw== X-Gm-Message-State: ABUngvdhl9Y0/MKJ0jS44OlHxlzZ++KD45LBsWM0aRbo+Jv8VXds/QDJrsJNS5E0Ikj8FtE1G0lhtwinChLm1Q== X-Received: by 10.200.36.125 with SMTP id d58mr7450503qtd.147.1477154295828; Sat, 22 Oct 2016 09:38:15 -0700 (PDT) In-Reply-To: <83k2d5ww1x.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::235 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111593 Archived-At: On Tue, Oct 18, 2016 at 10:50 AM Eli Zaretskii wrote: > Well, this doesn't happen to me, and from lack of other "me too" > responses, I'm guessing that this is either specific to OS X or even > to your system's configuration. > Thanks, Eli. My guess is that it's specific to OS X. I looked at the Emacs source code a bit. I found the following in delete_frame[1]: ``` #ifdef NS_IMPL_COCOA else /* Under NS, there is no system mechanism for choosing a new window to get focus -- it is left to application code. So the portion of THIS application interfacing with NS needs to know about it. We call Fraise_frame, but the purpose is really to transfer focus. */ Fraise_frame (frame1); #endif ``` The following might also be relevant: - Apple's window concepts documentation[2] - Uses of NSApp[3], e.g., - activateIgnoringOtherApps[4] - makeKeyAndOrderFront[5] [1]: https://github.com/emacs-mirror/emacs/blob/d4a32c4d5955ac04c5017a43042d873e42b3ebec/src/frame.c#L1639 [2]: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html [3]: https://github.com/emacs-mirror/emacs/search?utf8=%E2%9C%93&q=nsapp [4]: https://github.com/emacs-mirror/emacs/search?utf8=%E2%9C%93&q=activateIgnoringOtherApps&type=Code [5]: https://github.com/emacs-mirror/emacs/search?utf8=%E2%9C%93&q=makeKeyAndOrderFront&type=Code