diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-05-06 10:07:25 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-05-07 21:35:25 -0400 |
commit | 1d9e66aea17787e03954f32c6cd7561c881bb444 (patch) | |
tree | b534a4affc9ff6b204f8fd1965f9845b15dc2317 | |
parent | 7dc028e2501feec7d7fca5987ab852b261aa4039 (diff) | |
download | emacs-1d9e66aea17787e03954f32c6cd7561c881bb444.tar.gz |
Don't check non-X frames for z order (Bug#31373)
* src/xfns.c (x_frame_list_z_order): Only use frames with
`output_method' set to `output_x_window'.
-rw-r--r-- | src/xfns.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/xfns.c b/src/xfns.c index 20fe61bffd8..3da853ede8a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5300,12 +5300,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); |