From 5f7a18903e92294a624a9ad34abdeb75cc2feace Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 18 Dec 2000 11:36:34 +0000 Subject: [PATCH] (show_busy_cursor): Check for live frames more thoroughly. --- src/ChangeLog | 3 +++ src/xfns.c | 52 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cbbfea69bfd..882f3046815 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2000-12-18 Gerd Moellmann + * xfns.c (show_busy_cursor): Check for live frames more + thoroughly. + * process.c (wait_reading_process_input): Check for pending input when running timers. diff --git a/src/xfns.c b/src/xfns.c index ab4f288cb01..11c45e7ffde 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -10268,31 +10268,41 @@ show_busy_cursor (timer) 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; + if (!f->output_data.x->busy_window) + { + unsigned long mask = CWCursor; + XSetWindowAttributes attrs; - attrs.cursor = f->output_data.x->busy_cursor; + attrs.cursor = f->output_data.x->busy_cursor; - 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); - } + 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; -- 2.39.2