emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b12333f 1/4: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master b12333f 1/4: Merge from origin/emacs-26
Date: Mon, 4 Jun 2018 12:29:13 -0400 (EDT)

branch: master
commit b12333f122eecf491ffb88a8410432bf62c22cbc
Merge: 5e30752 defd53a
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-26
    
    defd53a Set accessibility subroles for child frame (bug#31324)
    de6a876 Fix redefinition of child frames on NS
---
 src/nsterm.m | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index 3c95fed..c0d2d91 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2016,12 +2016,34 @@ x_set_parent_frame (struct frame *f, Lisp_Object 
new_value, Lisp_Object old_valu
 
   if (p != FRAME_PARENT_FRAME (f))
     {
-      parent = [FRAME_NS_VIEW (p) window];
+      block_input ();
       child = [FRAME_NS_VIEW (f) window];
 
-      block_input ();
-      [parent addChildWindow: child
-                     ordered: NSWindowAbove];
+      if ([child parentWindow] != nil)
+        {
+          [[child parentWindow] removeChildWindow:child];
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
+          if ([child respondsToSelector:@selector(setAccessibilitySubrole:)]
+#endif
+              [child 
setAccessibilitySubrole:NSAccessibilityStandardWindowSubrole];
+#endif
+        }
+
+      if (!NILP (new_value))
+        {
+          parent = [FRAME_NS_VIEW (p) window];
+
+          [parent addChildWindow: child
+                         ordered: NSWindowAbove];
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
+          if ([child respondsToSelector:@selector(setAccessibilitySubrole:)]
+#endif
+              [child 
setAccessibilitySubrole:NSAccessibilityFloatingWindowSubrole];
+#endif
+        }
+
       unblock_input ();
 
       fset_parent_frame (f, new_value);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]