GNU bug report logs -
#31373
26.1; frame-list-z-order segfaults on initial daemon frame
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Sun, 6 May 2018 13:36:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 31373 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> Ah, yes, thank you. I forgot about --fg-daemon (which I now remembered
> is documented in '(emacs) Initial Options') because it is not mentioned
> in the emacs(1) man page; do you think this option should be added there?
Oh, yes it should be.
>> + if (XFRAME (frame)->output_method == output_x_window
Also, I noticed that there is FRAME_X_P for this. I can't find any more
obvious instances of missing this check, although it's hard to tell in
many cases if the frame is really guaranteed to have output_x_window has
the output_method.
[v2-0001-Don-t-check-non-X-frames-for-z-order-Bug-31373.patch (text/x-diff, inline)]
From 5ad7571a59eb744c65a23198729ea2b56155a2c2 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Sun, 6 May 2018 10:07:25 -0400
Subject: [PATCH v2] 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'.
---
src/xfns.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/xfns.c b/src/xfns.c
index 20fe61bffd..863fdefa5f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5303,8 +5303,9 @@ x_frame_list_z_order (Display* dpy, Window window)
/* 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])
+ if (FRAME_X_P (frame)
+ && (XFRAME (frame)->output_data.x->parent_desc == children[i]
+ || FRAME_OUTER_WINDOW (XFRAME (frame)) == children[i]))
frames = Fcons (frame, frames);
}
--
2.11.0
This bug report was last modified 7 years and 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.