From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#31324: 26.0.91; Wrong AXSubrole of childframe on macOS Date: Tue, 1 May 2018 21:37:58 +0100 Message-ID: <20180501203758.GA74662@breton.holly.idiocy.org> References: <58a8e0b4-311c-4aa4-a5f1-f968ca93b6d3@Spark> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1525207028 26100 195.159.176.226 (1 May 2018 20:37:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 May 2018 20:37:08 +0000 (UTC) User-Agent: Mutt/1.9.3 (2018-01-21) Cc: 31324@debbugs.gnu.org To: Fu Yuan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 01 22:37:03 2018 Return-path: Envelope-to: geb-bug-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 1fDc1H-0006i9-J4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 May 2018 22:37:03 +0200 Original-Received: from localhost ([::1]:46031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDc3O-0005BG-Q1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 May 2018 16:39:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDc3H-00058K-G1 for bug-gnu-emacs@gnu.org; Tue, 01 May 2018 16:39:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDc3D-0002um-B7 for bug-gnu-emacs@gnu.org; Tue, 01 May 2018 16:39:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38229) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fDc3D-0002ub-4w for bug-gnu-emacs@gnu.org; Tue, 01 May 2018 16:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fDc3C-0006Y4-T3 for bug-gnu-emacs@gnu.org; Tue, 01 May 2018 16:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 May 2018 20:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31324 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31324-submit@debbugs.gnu.org id=B31324.152520708925107 (code B ref 31324); Tue, 01 May 2018 20:39:01 +0000 Original-Received: (at 31324) by debbugs.gnu.org; 1 May 2018 20:38:09 +0000 Original-Received: from localhost ([127.0.0.1]:46126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fDc2K-0006Wt-Pd for submit@debbugs.gnu.org; Tue, 01 May 2018 16:38:08 -0400 Original-Received: from mail-wr0-f176.google.com ([209.85.128.176]:37404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fDc2J-0006Wh-Hx for 31324@debbugs.gnu.org; Tue, 01 May 2018 16:38:08 -0400 Original-Received: by mail-wr0-f176.google.com with SMTP id c14-v6so11816891wrd.4 for <31324@debbugs.gnu.org>; Tue, 01 May 2018 13:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=CURi+uvUit1lhtxTKqmx+vgQiiJxEb3GsZyMhCI3nJs=; b=vbSp+I5xgPyID6falIjhY4ceoEhzLxKkTzUZXlrSnqpQqU9kHR7Y2SMADQAosh1Sf1 93x48b1oJOHRqPw1XEkP+EWWOE75hMDoWOMeIKTKaM5W3ko2JW2JjpH8n7A7N0KcViXV 1COzRmp61drTB18G8IADhCD5kwNmoa6zsw/jf5e06vqzv/8BGrjSdI0+B0DrDcV63uAd acXyXK66UnZMre2W/bVIIms36HaxWwLTB+YLb+hILnxJLXVhijTOW4TlvaPnZApU+39C Ol4QrouHCqxJlu7lepbR9ncxKdnjet/ouTTL6blG38AbJFhvIgn8o58hJhjzygqEg5dZ LUYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=CURi+uvUit1lhtxTKqmx+vgQiiJxEb3GsZyMhCI3nJs=; b=eHlzkf4HNfK57S08MfCrdLmp7i6YknxSmiClNkXdOoWtH4MBZn2LZHcV1W+uYfVmv+ Gbmj27Zyi5FuK5+sqdNqatSFlO4LP7MNJmliw/0jCRQje3WvjUGcykIjeYY1Wx2IGN6a Mgr/AOpvGc4GCIkUBk9IGKxFdV6ixuGN1DaMEWxxc7aRQQm8jWzjCU2t+Lz/j8gXpC8/ CPsA0lXl3TBRq4keuAdk9evYoHFiGp8Z8s/dX5f3XnRIFN2kA9TyrWLFMT2g0IBYjrkK FWDcEdl6dDrjNvHMfd9w28n024sz+JHhjNvnlXxO+fUtKt7UfozR7+TfAs5E6PdsYRQu V/6A== X-Gm-Message-State: ALQs6tAnxn6o/D2RhfkDfFAGX2uq67MB1IOWzXiTECUAdu0ItPEqECjU /EsgQOhneTLf1TbqxdqEJYQ= X-Google-Smtp-Source: AB8JxZp/cM255ifNAZEXjTPrlz3QVdTUcoV1Kg/DJ82D8Fe64KwHi3aV0lQCJihbykg9+96+6TrHgQ== X-Received: by 2002:adf:8672:: with SMTP id 47-v6mr12325472wrw.102.1525207081683; Tue, 01 May 2018 13:38:01 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-e4e3-c603-7321-d969.holly.idiocy.org. [2001:8b0:3f8:8129:e4e3:c603:7321:d969]) by smtp.gmail.com with ESMTPSA id y84sm1594729wmg.44.2018.05.01.13.38.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 13:38:00 -0700 (PDT) Content-Disposition: inline In-Reply-To: <58a8e0b4-311c-4aa4-a5f1-f968ca93b6d3@Spark> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145907 Archived-At: On Mon, Apr 30, 2018 at 07:46:55PM -0400, Fu Yuan wrote: > > * Symptom > > On macOS, the AXSubrole of a childframe is set to AXStandardWindow. This > setting causes other applications on the same machine to possible > interfere Emacs. For example, a windows manager will reposition the > childframe, as descussed here: > https://github.com/emacs-lsp/lsp-ui/issues/107#issuecomment-385377352 > > In the discussion, koekeishiya suggested to set the attribute to > kAXDialogSubrole or kAXFloatingWindowSubrole. Unfortunately those are Carbon attributes and I don’t think we can (or want to) set them directly. It looks like the nearest equivalent is the NSWindow level attribute, which we’re using for z‐groups. Can you please try the following: (let ((frame (selected-frame))) (make-frame-command) (set-frame-parameter nil 'parent-frame frame) (set-frame-parameter nil 'z-group 'above)) and see what the UIElementInspector returns? (I can’t build it as I don’t have xcode installed.) If you’re able you could try applying this patch: 1 file changed, 1 insertion(+), 1 deletion(-) src/nsterm.m | 2 +- modified src/nsterm.m @@ -2028,7 +2028,7 @@ so some key presses (TAB) are swallowed by the system. */ } else if (EQ (new_value, Qabove)) { - window.level = NSNormalWindowLevel + 1; + window.level = NSFloatingWindowLevel; FRAME_Z_GROUP (f) = z_group_above; } else if (EQ (new_value, Qabove_suspended)) and run the lisp above again and see if it’s different. -- Alan Third