]> code.delx.au - gnu-emacs/blobdiff - src/w32fns.c
Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
[gnu-emacs] / src / w32fns.c
index 5b936195aa54e370054415fde17025986b431fba..f5161117f9d22032ed72dc7e782c205a4986f221 100644 (file)
@@ -1,6 +1,6 @@
 /* Graphical user interface functions for the Microsoft W32 API.
 
-Copyright (C) 1989, 1992-2011  Free Software Foundation, Inc.
+Copyright (C) 1989, 1992-2012  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -2417,7 +2417,7 @@ complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result)
   deferred_msg * msg_buf = find_deferred_msg (hwnd, msg);
 
   if (msg_buf == NULL)
-    /* Message may have been cancelled, so don't abort.  */
+    /* Message may have been canceled, so don't abort.  */
     return;
 
   msg_buf->result = result;
@@ -2479,6 +2479,10 @@ signal_user_input (void)
   if (!NILP (Vthrow_on_input))
     {
       Vquit_flag = Vthrow_on_input;
+      /* Doing a QUIT from this thread is a bad idea, since this
+        unwinds the stack of the Lisp thread, and the Windows runtime
+        rightfully barfs.  Disabled.  */
+#if 0
       /* If we're inside a function that wants immediate quits,
         do it now.  */
       if (immediate_quit && NILP (Vinhibit_quit))
@@ -2486,6 +2490,7 @@ signal_user_input (void)
          immediate_quit = 0;
          QUIT;
        }
+#endif
     }
 }
 
@@ -2538,7 +2543,7 @@ post_character_message (HWND hwnd, UINT msg,
            the lisp thread to respond.
 
           Note that we don't want to block the input thread waiting for
-          a reponse from the lisp thread (although that would at least
+          a response from the lisp thread (although that would at least
           solve the deadlock problem above), because we want to be able
           to receive C-g to interrupt the lisp thread.  */
        cancel_all_deferred_msgs ();
@@ -2943,7 +2948,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
       break;
 
     case WM_IME_CHAR:
-      /* If we can't get the IME result as unicode, use default processing,
+      /* If we can't get the IME result as Unicode, use default processing,
          which will at least allow characters decodable in the system locale
          get through.  */
       if (!get_composition_string_fn)
@@ -3711,7 +3716,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
       if (w32_system_caret_hwnd == NULL)
        {
          /* Use the default caret width, and avoid changing it
-            unneccesarily, as it confuses screen reader software.  */
+            unnecessarily, as it confuses screen reader software.  */
          w32_system_caret_hwnd = hwnd;
          CreateCaret (hwnd, NULL, 0,
                       w32_system_caret_height);
@@ -3749,7 +3754,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
          flags |= TPM_RIGHTBUTTON;
 
        /* Remember we did a SetCapture on the initial mouse down event,
-          so for safety, we make sure the capture is cancelled now.  */
+          so for safety, we make sure the capture is canceled now.  */
        ReleaseCapture ();
        button_state = 0;
 
@@ -3998,7 +4003,7 @@ unwind_create_frame (Lisp_Object frame)
 #if GLYPH_DEBUG
       /* Check that reference counts are indeed correct.  */
       xassert (dpyinfo->reference_count == dpyinfo_refcount);
-      xassert (dpyinfo->image_cache->refcount == image_cache_refcount);
+      xassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
 #endif
       return Qt;
     }
@@ -4951,7 +4956,7 @@ If TYPE is nil or omitted, get the property as a string.
 Otherwise TYPE is the name of the atom that denotes the type expected.
 If SOURCE is non-nil, get the property on that window instead of from
 FRAME.  The number 0 denotes the root window.
-If DELETE_P is non-nil, delete the property after retreiving it.
+If DELETE_P is non-nil, delete the property after retrieving it.
 If VECTOR_RET_P is non-nil, don't return a string but a vector of values.
 
 Value is nil if FRAME hasn't a property with name PROP or if PROP has
@@ -5011,15 +5016,6 @@ no value of TYPE (always string in the MS Windows case).  */)
    cursor.  Duplicated from xdisp.c, but cannot use the version there
    due to lack of atimers on w32.  */
 #define DEFAULT_HOURGLASS_DELAY 1
-/* Return non-zero if houglass timer has been started or hourglass is shown.  */
-/* PENDING: if W32 can use atimers (atimer.[hc]) then the common impl in
-           xdisp.c could be used. */
-
-int
-hourglass_started (void)
-{
-  return hourglass_shown_p || hourglass_timer;
-}
 
 /* Cancel a currently active hourglass timer, and start a new one.  */
 
@@ -5240,7 +5236,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
 
 #if GLYPH_DEBUG
   image_cache_refcount =
-    FRAME_IMAGE_CACHE ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
   dpyinfo_refcount = dpyinfo->reference_count;
 #endif /* GLYPH_DEBUG */
   FRAME_KBOARD (f) = kb;
@@ -6031,7 +6027,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories.  */)
 
        file = DECODE_FILE (build_string (filename));
       }
-    /* User cancelled the dialog without making a selection.  */
+    /* User canceled the dialog without making a selection.  */
     else if (!CommDlgExtendedError ())
       file = Qnil;
     /* An error occurred, fallback on reading from the mini-buffer.  */