diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsfns.m | 6 | ||||
| -rw-r--r-- | src/xfns.c | 16 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/nsfns.m b/src/nsfns.m index 7cf45a54f90..9ff7e88a8d4 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -1451,9 +1451,9 @@ Frames are listed from topmost (first) to bottommost (last). */) | |||
| 1451 | { | 1451 | { |
| 1452 | Lisp_Object frame; | 1452 | Lisp_Object frame; |
| 1453 | 1453 | ||
| 1454 | /* Check against [win parentWindow] so that it doesn't match | 1454 | /* Check against [win parentWindow] so that it doesn't match itself. */ |
| 1455 | itself. */ | 1455 | if ([[win delegate] isKindOfClass:[EmacsView class]] |
| 1456 | if (parent == nil || ns_window_is_ancestor (parent, [win parentWindow])) | 1456 | && (parent == nil || ns_window_is_ancestor (parent, [win parentWindow]))) |
| 1457 | { | 1457 | { |
| 1458 | XSETFRAME (frame, ((EmacsView *)[win delegate])->emacsframe); | 1458 | XSETFRAME (frame, ((EmacsView *)[win delegate])->emacsframe); |
| 1459 | frames = Fcons(frame, frames); | 1459 | frames = Fcons(frame, frames); |
diff --git a/src/xfns.c b/src/xfns.c index 78151c81380..fe8170cf635 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -5321,12 +5321,16 @@ x_frame_list_z_order (Display* dpy, Window window) | |||
| 5321 | Lisp_Object frame, tail; | 5321 | Lisp_Object frame, tail; |
| 5322 | 5322 | ||
| 5323 | FOR_EACH_FRAME (tail, frame) | 5323 | FOR_EACH_FRAME (tail, frame) |
| 5324 | /* With a reparenting window manager the parent_desc field | 5324 | { |
| 5325 | usually specifies the topmost windows of our frames. | 5325 | struct frame *cf = XFRAME (frame); |
| 5326 | Otherwise FRAME_OUTER_WINDOW should do. */ | 5326 | /* With a reparenting window manager the parent_desc |
| 5327 | if (XFRAME (frame)->output_data.x->parent_desc == children[i] | 5327 | field usually specifies the topmost windows of our |
| 5328 | || FRAME_OUTER_WINDOW (XFRAME (frame)) == children[i]) | 5328 | frames. Otherwise FRAME_OUTER_WINDOW should do. */ |
| 5329 | frames = Fcons (frame, frames); | 5329 | if (FRAME_X_P (cf) |
| 5330 | && (cf->output_data.x->parent_desc == children[i] | ||
| 5331 | || FRAME_OUTER_WINDOW (cf) == children[i])) | ||
| 5332 | frames = Fcons (frame, frames); | ||
| 5333 | } | ||
| 5330 | } | 5334 | } |
| 5331 | 5335 | ||
| 5332 | if (children) XFree ((char *)children); | 5336 | if (children) XFree ((char *)children); |