Mercurial > emacs
changeset 34662:d8005f5e0a23
(show_busy_cursor): Check for live frames more
thoroughly.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 18 Dec 2000 11:36:13 +0000 |
parents | ef8413670ea4 |
children | 0d188d8c4567 |
files | src/xfns.c |
diffstat | 1 files changed, 32 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfns.c Mon Dec 18 11:25:48 2000 +0000 +++ b/src/xfns.c Mon Dec 18 11:36:13 2000 +0000 @@ -10268,31 +10268,41 @@ BLOCK_INPUT; FOR_EACH_FRAME (rest, frame) - if (FRAME_X_P (XFRAME (frame))) - { - struct frame *f = XFRAME (frame); - - f->output_data.x->busy_p = 1; + { + struct frame *f = XFRAME (frame); + + if (FRAME_LIVE_P (f) && FRAME_X_P (f) && FRAME_X_DISPLAY (f)) + { + Display *dpy = FRAME_X_DISPLAY (f); + +#ifdef USE_X_TOOLKIT + if (f->output_data.x->widget) +#else + if (FRAME_OUTER_WINDOW (f)) +#endif + { + f->output_data.x->busy_p = 1; - if (!f->output_data.x->busy_window) - { - unsigned long mask = CWCursor; - XSetWindowAttributes attrs; - - attrs.cursor = f->output_data.x->busy_cursor; + if (!f->output_data.x->busy_window) + { + unsigned long mask = CWCursor; + XSetWindowAttributes attrs; - f->output_data.x->busy_window - = XCreateWindow (FRAME_X_DISPLAY (f), - FRAME_OUTER_WINDOW (f), - 0, 0, 32000, 32000, 0, 0, - InputOnly, - CopyFromParent, - mask, &attrs); - } + attrs.cursor = f->output_data.x->busy_cursor; + + f->output_data.x->busy_window + = XCreateWindow (dpy, FRAME_OUTER_WINDOW (f), + 0, 0, 32000, 32000, 0, 0, + InputOnly, + CopyFromParent, + mask, &attrs); + } - XMapRaised (FRAME_X_DISPLAY (f), f->output_data.x->busy_window); - XFlush (FRAME_X_DISPLAY (f)); - } + XMapRaised (dpy, f->output_data.x->busy_window); + XFlush (dpy); + } + } + } busy_cursor_shown_p = 1; UNBLOCK_INPUT;