aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Third2017-10-11 22:17:10 +0100
committerAlan Third2017-10-11 22:21:57 +0100
commit078fb7f6df4178d5a35243dad164cdd196392e71 (patch)
tree9445c1416d6f5f1d0bb3cd5eb178652b3c2d72b0
parent906224eba147bdfc0514090064e8e8f53160f1d4 (diff)
downloademacs-078fb7f6df4178d5a35243dad164cdd196392e71.tar.gz
emacs-078fb7f6df4178d5a35243dad164cdd196392e71.zip
Make frame-list-z-order on NS match Windows behaviour (bug#28788)
* src/nsfns.m (Fns_frame_list_z_order): If terminal isn't a frame, ignore it rather than returning nil.
-rw-r--r--src/nsfns.m11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index ba363629686..c8a41f5b4b0 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1476,13 +1476,8 @@ ns_window_is_ancestor (NSWindow *win, NSWindow *candidate)
1476DEFUN ("ns-frame-list-z-order", Fns_frame_list_z_order, 1476DEFUN ("ns-frame-list-z-order", Fns_frame_list_z_order,
1477 Sns_frame_list_z_order, 0, 1, 0, 1477 Sns_frame_list_z_order, 0, 1, 0,
1478 doc: /* Return list of Emacs' frames, in Z (stacking) order. 1478 doc: /* Return list of Emacs' frames, in Z (stacking) order.
1479The optional argument TERMINAL specifies which display to ask about. 1479If TERMINAL is non-nil and specifies a live frame, return the child
1480TERMINAL should be either a frame or a display name (a string). If 1480frames of that frame in Z (stacking) order.
1481omitted or nil, that stands for the selected frame's display. Return
1482nil if TERMINAL contains no Emacs frame.
1483
1484As a special case, if TERMINAL is non-nil and specifies a live frame,
1485return the child frames of that frame in Z (stacking) order.
1486 1481
1487Frames are listed from topmost (first) to bottommost (last). */) 1482Frames are listed from topmost (first) to bottommost (last). */)
1488 (Lisp_Object terminal) 1483 (Lisp_Object terminal)
@@ -1492,8 +1487,6 @@ Frames are listed from topmost (first) to bottommost (last). */)
1492 1487
1493 if (FRAMEP (terminal) && FRAME_LIVE_P (XFRAME (terminal))) 1488 if (FRAMEP (terminal) && FRAME_LIVE_P (XFRAME (terminal)))
1494 parent = [FRAME_NS_VIEW (XFRAME (terminal)) window]; 1489 parent = [FRAME_NS_VIEW (XFRAME (terminal)) window];
1495 else if (!NILP (terminal))
1496 return Qnil;
1497 1490
1498 for (NSWindow *win in [[NSApp orderedWindows] reverseObjectEnumerator]) 1491 for (NSWindow *win in [[NSApp orderedWindows] reverseObjectEnumerator])
1499 { 1492 {