Mercurial > emacs
comparison src/xfns.c @ 43914:fed15ed090bc
(x_real_positions): Handle failure in XQueryTree.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 14 Mar 2002 09:13:28 +0000 |
parents | 5505d571541b |
children | 110730fc1e56 |
comparison
equal
deleted
inserted
replaced
43913:edfc0feeb0c3 | 43914:fed15ed090bc |
---|---|
1174 for (;;) | 1174 for (;;) |
1175 { | 1175 { |
1176 Window wm_window, rootw; | 1176 Window wm_window, rootw; |
1177 Window *tmp_children; | 1177 Window *tmp_children; |
1178 unsigned int tmp_nchildren; | 1178 unsigned int tmp_nchildren; |
1179 | 1179 int success; |
1180 XQueryTree (FRAME_X_DISPLAY (f), win, &rootw, | 1180 |
1181 &wm_window, &tmp_children, &tmp_nchildren); | 1181 success = XQueryTree (FRAME_X_DISPLAY (f), win, &rootw, |
1182 &wm_window, &tmp_children, &tmp_nchildren); | |
1183 | |
1184 had_errors = x_had_errors_p (FRAME_X_DISPLAY (f)); | |
1185 | |
1186 /* Don't free tmp_children if XQueryTree failed. */ | |
1187 if (! success) | |
1188 break; | |
1189 | |
1182 XFree ((char *) tmp_children); | 1190 XFree ((char *) tmp_children); |
1183 | |
1184 had_errors = x_had_errors_p (FRAME_X_DISPLAY (f)); | |
1185 | 1191 |
1186 if (wm_window == rootw || had_errors) | 1192 if (wm_window == rootw || had_errors) |
1187 break; | 1193 break; |
1188 | 1194 |
1189 win = wm_window; | 1195 win = wm_window; |