]> git.eshelyaron.com Git - emacs.git/commitdiff
(show_busy_cursor): Check for live frames more
authorGerd Moellmann <gerd@gnu.org>
Mon, 18 Dec 2000 11:36:34 +0000 (11:36 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 18 Dec 2000 11:36:34 +0000 (11:36 +0000)
thoroughly.

src/ChangeLog
src/xfns.c

index cbbfea69bfd9a1182e27c9850c108fb955167bfd..882f3046815e7b4eec0f99017045cab286b1d9dc 100644 (file)
@@ -1,5 +1,8 @@
 2000-12-18  Gerd Moellmann  <gerd@gnu.org>
 
+       * xfns.c (show_busy_cursor): Check for live frames more
+       thoroughly.
+
        * process.c (wait_reading_process_input): Check for pending
        input when running timers.
 
index ab4f288cb011116b0a0398ed2b8adeace5e876c2..11c45e7ffde4c1a4eb6f15e196af416e0715a7c8 100644 (file)
@@ -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;