all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Fu Yuan <casouri@gmail.com>
Cc: 31324@debbugs.gnu.org
Subject: bug#31324: 26.0.91; Wrong AXSubrole of childframe on macOS
Date: Tue, 1 May 2018 21:37:58 +0100	[thread overview]
Message-ID: <20180501203758.GA74662@breton.holly.idiocy.org> (raw)
In-Reply-To: <58a8e0b4-311c-4aa4-a5f1-f968ca93b6d3@Spark>

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





       reply	other threads:[~2018-05-01 20:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <58a8e0b4-311c-4aa4-a5f1-f968ca93b6d3@Spark>
2018-05-01 20:37 ` Alan Third [this message]
     [not found]   ` <034b13c0-b1c0-4340-bfd5-3de34f60322f@Spark>
2018-05-13 10:14     ` bug#31324: 26.0.91; Wrong AXSubrole of childframe on macOS Alan Third
2018-05-13 10:17       ` Fu Yuan
2018-05-13 10:33         ` Alan Third
2018-05-20  6:33           ` Fu Yuan
2018-05-22 19:40             ` Alan Third
2018-05-23  2:27               ` Eli Zaretskii
2018-06-03 19:35                 ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180501203758.GA74662@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=31324@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.