emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117473: On MS-Windows, display busy cursor on all G


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r117473: On MS-Windows, display busy cursor on all GUI frames.
Date: Thu, 03 Jul 2014 18:13:46 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117473
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2014-07-03 22:12:41 +0400
message:
  On MS-Windows, display busy cursor on all GUI frames.
  This is similar to what we have on X.  Quickly tested by Dani Moncayo.
  * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
  (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
  Likewise.
  (hide_hourglass, show_hourglass): Redesign to match X counterparts.
  * xdisp.c (start_hourglass): Remove Windows-specific bits.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/w32fns.c                   w32fns.c-20091113204419-o5vbwnq5f7feedwu-945
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-07-03 12:20:00 +0000
+++ b/src/ChangeLog     2014-07-03 18:12:41 +0000
@@ -1,5 +1,15 @@
 2014-07-03  Dmitry Antipov  <address@hidden>
 
+       On MS-Windows, display busy cursor on all GUI frames.
+       This is similar to what we have on X.  Quickly tested by Dani Moncayo.
+       * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
+       (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
+       Likewise.
+       (hide_hourglass, show_hourglass): Redesign to match X counterparts.
+       * xdisp.c (start_hourglass): Remove Windows-specific bits.
+
+2014-07-03  Dmitry Antipov  <address@hidden>
+
        Use convenient alists to manage per-frame font driver-specific data.
        * frame.h (struct frame): Rename font_data_list to...
        [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2014-06-29 16:12:08 +0000
+++ b/src/w32fns.c      2014-07-03 18:12:41 +0000
@@ -89,9 +89,6 @@
 extern const char *map_w32_filename (const char *, const char **);
 extern char * w32_strerror (int error_no);
 
-/* If non-NULL, a handle to a frame where to display the hourglass cursor.  */
-static HWND hourglass_hwnd = NULL;
-
 #ifndef IDC_HAND
 #define IDC_HAND MAKEINTRESOURCE(32649)
 #endif
@@ -233,10 +230,6 @@
 extern void syms_of_w32uniscribe (void);
 extern int uniscribe_available;
 
-/* Function prototypes for hourglass support.  */
-static void w32_show_hourglass (struct frame *);
-static void w32_hide_hourglass (void);
-
 #ifdef WINDOWSNT
 /* From w32inevt.c */
 extern int faked_key;
@@ -5500,95 +5493,62 @@
                                Busy cursor
  ***********************************************************************/
 
-void
-w32_note_current_window (void)
-{
-  struct frame * f = SELECTED_FRAME ();
-
-  if (!FRAME_W32_P (f))
-    return;
-
-  hourglass_hwnd = FRAME_W32_WINDOW (f);
-}
+/* Display an hourglass cursor.  Set the hourglass_p flag in display info
+   to indicate that an hourglass cursor is shown.  */
 
 void
 show_hourglass (struct atimer *timer)
 {
-  struct frame *f;
-
   hourglass_atimer = NULL;
 
-  block_input ();
-  f = x_window_to_frame (&one_w32_display_info,
-                                      hourglass_hwnd);
-
-  if (f)
-    f->output_data.w32->hourglass_p = 0;
-  else
-    f = SELECTED_FRAME ();
-
-  if (!FRAME_W32_P (f))
-    {
-      unblock_input ();
-      return;
-    }
-
-  w32_show_hourglass (f);
-  unblock_input ();
-}
-
-void
-hide_hourglass (void)
-{
-  block_input ();
-  w32_hide_hourglass ();
-  unblock_input ();
-}
-
-
-/* Display an hourglass cursor.  Set the hourglass_p flag in display info
-   to indicate that an hourglass cursor is shown.  */
-
-static void
-w32_show_hourglass (struct frame *f)
-{
   if (!hourglass_shown_p)
     {
-      f->output_data.w32->hourglass_p = 1;
-      if (!menubar_in_use && !current_popup_menu)
-       SetCursor (f->output_data.w32->hourglass_cursor);
+      Lisp_Object tail, frame;
+
+      block_input ();
+      FOR_EACH_FRAME (tail, frame)
+       {
+         struct frame *f = XFRAME (frame);
+
+         if (FRAME_W32_P (f) && !menubar_in_use && !current_popup_menu)
+           {
+             f->output_data.w32->hourglass_p = 1;
+             SetCursor (f->output_data.w32->hourglass_cursor);
+           }
+       }
+      unblock_input ();
       hourglass_shown_p = 1;
     }
 }
 
-
 /* Hide the hourglass cursor on all frames, if it is currently shown.  */
 
-static void
-w32_hide_hourglass (void)
+void
+hide_hourglass (void)
 {
   if (hourglass_shown_p)
     {
-      struct frame *f = x_window_to_frame (&one_w32_display_info,
-                                          hourglass_hwnd);
-      if (f)
-       f->output_data.w32->hourglass_p = 0;
-      else
-       /* If frame was deleted, restore to selected frame's cursor.  */
-       f = SELECTED_FRAME ();
-
-      if (FRAME_W32_P (f))
-       SetCursor (f->output_data.w32->current_cursor);
-      else
-       /* No cursors on non GUI frames - restore to stock arrow cursor.  */
-       SetCursor (w32_load_cursor (IDC_ARROW));
-
+      Lisp_Object tail, frame;
+
+      block_input ();
+      FOR_EACH_FRAME (tail, frame)
+       {
+         struct frame *f = XFRAME (frame);
+
+         if (FRAME_W32_P (f))
+           {
+             f->output_data.w32->hourglass_p = 0;
+             SetCursor (f->output_data.w32->current_cursor);
+           }
+         else
+           /* No cursors on non GUI frames - restore to stock arrow cursor.  */
+           SetCursor (w32_load_cursor (IDC_ARROW));
+       }
+      unblock_input ();
       hourglass_shown_p = 0;
     }
 }
 
-
-
 /***********************************************************************
                                Tool tips
  ***********************************************************************/
@@ -8415,9 +8375,6 @@
 #endif
 
   defsubr (&Sset_message_beep);
-
-  hourglass_hwnd = NULL;
-
   defsubr (&Sx_show_tip);
   defsubr (&Sx_hide_tip);
   tip_timer = Qnil;

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-07-03 06:00:53 +0000
+++ b/src/xdisp.c       2014-07-03 18:12:41 +0000
@@ -30683,13 +30683,6 @@
   else
     delay = make_timespec (DEFAULT_HOURGLASS_DELAY, 0);
 
-#ifdef HAVE_NTGUI
-  {
-    extern void w32_note_current_window (void);
-    w32_note_current_window ();
-  }
-#endif /* HAVE_NTGUI */
-
   hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,
                                   show_hourglass, NULL);
 }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]