aboutsummaryrefslogtreecommitdiffstats
path: root/src/xfns.c
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2000-12-18 11:36:34 +0000
committerGerd Moellmann <[email protected]>2000-12-18 11:36:34 +0000
commit5f7a18903e92294a624a9ad34abdeb75cc2feace (patch)
tree9d1f6336ee53f53c0381134a74f5644899c95048 /src/xfns.c
parentc3695f5f58e803366eb99395d20ca5f2383403a4 (diff)
(show_busy_cursor): Check for live frames more
thoroughly.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c52
1 files changed, 31 insertions, 21 deletions
diff --git a/src/xfns.c b/src/xfns.c
index ab4f288cb0..11c45e7ffd 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;