summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-05-15 09:09:48 -0700
committerGlenn Morris <rgm@gnu.org>2018-05-15 09:09:48 -0700
commit3ee1841f288b5b9cf9301945d10db2b45688bcf8 (patch)
treea1168744379c82fa3c0a92e14373fcc3897fb435 /src/xfns.c
parentb3956d85c71c30af732a8bc035ed39421bafe11d (diff)
parentb98cf9cdabd710f89eb57645a163fd52db338404 (diff)
downloademacs-3ee1841f288b5b9cf9301945d10db2b45688bcf8.tar.gz
Merge from origin/emacs-26
b98cf9c ; Fix a typo in the Emacs manual 700fcd7 * doc/emacs/help.texi: Fix paren typo. c9c0e40 More minor changes in shell-related nodes of Emacs manual e6bf19c Fix inaccuracies in "Shell Ring" node of Emacs manual 087681b8 Improve documentation of kmacro commands and variables. be2e8cb * doc/man/emacs.1.in: Document --fg-daemon and --bg-daemon. 1d9e66a Don't check non-X frames for z order (Bug#31373) 7dc028e Check NSWindow is actually a frame Conflicts: src/nsfns.m
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c16
1 files changed, 10 insertions, 6 deletions
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)
Lisp_Object frame, tail;
FOR_EACH_FRAME (tail, frame)
- /* With a reparenting window manager the parent_desc field
- usually specifies the topmost windows of our frames.
- Otherwise FRAME_OUTER_WINDOW should do. */
- if (XFRAME (frame)->output_data.x->parent_desc == children[i]
- || FRAME_OUTER_WINDOW (XFRAME (frame)) == children[i])
- frames = Fcons (frame, frames);
+ {
+ struct frame *cf = XFRAME (frame);
+ /* With a reparenting window manager the parent_desc
+ field usually specifies the topmost windows of our
+ frames. Otherwise FRAME_OUTER_WINDOW should do. */
+ if (FRAME_X_P (cf)
+ && (cf->output_data.x->parent_desc == children[i]
+ || FRAME_OUTER_WINDOW (cf) == children[i]))
+ frames = Fcons (frame, frames);
+ }
}
if (children) XFree ((char *)children);