diff options
| author | Richard M. Stallman | 1993-05-22 22:04:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-05-22 22:04:07 +0000 |
| commit | bcb2db92ba655162cb4664ebc501ac6551539754 (patch) | |
| tree | d4c8b78584acf4a8d278f0138b5c226025328eb9 | |
| parent | 1ce4cf3878abdf0102ac31590f8c686e6c48c671 (diff) | |
| download | emacs-bcb2db92ba655162cb4664ebc501ac6551539754.tar.gz emacs-bcb2db92ba655162cb4664ebc501ac6551539754.zip | |
(x_window_to_frame): Use XGCTYPE.
| -rw-r--r-- | src/xfns.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/xfns.c b/src/xfns.c index 9c417b28ac5..6905a67b6d5 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -198,6 +198,8 @@ struct face *x_face_table[MAX_FACES_AND_GLYPHS]; | |||
| 198 | /* Return the Emacs frame-object corresponding to an X window. | 198 | /* Return the Emacs frame-object corresponding to an X window. |
| 199 | It could be the frame's main window or an icon window. */ | 199 | It could be the frame's main window or an icon window. */ |
| 200 | 200 | ||
| 201 | /* This function can be called during GC, so use XGCTYPE. */ | ||
| 202 | |||
| 201 | struct frame * | 203 | struct frame * |
| 202 | x_window_to_frame (wdesc) | 204 | x_window_to_frame (wdesc) |
| 203 | int wdesc; | 205 | int wdesc; |
| @@ -205,10 +207,11 @@ x_window_to_frame (wdesc) | |||
| 205 | Lisp_Object tail, frame; | 207 | Lisp_Object tail, frame; |
| 206 | struct frame *f; | 208 | struct frame *f; |
| 207 | 209 | ||
| 208 | for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) | 210 | for (tail = Vframe_list; XGCTYPE (tail) == Lisp_Cons; |
| 211 | tail = XCONS (tail)->cdr) | ||
| 209 | { | 212 | { |
| 210 | frame = XCONS (tail)->car; | 213 | frame = XCONS (tail)->car; |
| 211 | if (XTYPE (frame) != Lisp_Frame) | 214 | if (XGCTYPE (frame) != Lisp_Frame) |
| 212 | continue; | 215 | continue; |
| 213 | f = XFRAME (frame); | 216 | f = XFRAME (frame); |
| 214 | if (FRAME_X_WINDOW (f) == wdesc | 217 | if (FRAME_X_WINDOW (f) == wdesc |