]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't check non-X frames for z order (Bug#31373)
authorNoam Postavsky <npostavs@gmail.com>
Sun, 6 May 2018 14:07:25 +0000 (10:07 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Tue, 8 May 2018 01:35:25 +0000 (21:35 -0400)
* src/xfns.c (x_frame_list_z_order): Only use frames with
`output_method' set to `output_x_window'.

src/xfns.c

index 20fe61bffd8a1dd5d3aa8c2b5f8ff403580fbe0c..3da853ede8a98a984c4ed0d8dce5aa9e214e7ec0 100644 (file)
@@ -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);