]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_update_window_begin): Only hide caret if
authorJason Rumney <jasonr@gnu.org>
Wed, 23 Jan 2002 22:03:26 +0000 (22:03 +0000)
committerJason Rumney <jasonr@gnu.org>
Wed, 23 Jan 2002 22:03:26 +0000 (22:03 +0000)
w32_use_visible_system_caret is set.
(x_update_window_end): Only show caret if
w32_use_visible_system_caret is set.
(syms_of_w32term): Handle SystemParametersInfo call failing.

src/ChangeLog
src/w32term.c

index 92a7ed4ec09d32b4b9c385fcd834a0c44c148a4e..2095530c7ad42146694f6d3730c11b11306e92a2 100644 (file)
@@ -1,3 +1,13 @@
+2002-01-23  Jason Rumney  <jasonr@gnu.org>
+
+       * w32term.c (x_update_window_begin): Only hide caret if
+       w32_use_visible_system_caret is set.
+       (x_update_window_end): Only show caret if
+       w32_use_visible_system_caret is set.
+       (syms_of_w32term): Handle SystemParametersInfo call failing.
+
+       * w32fns.c (syms_of_w32fns): Initialize w32_visible_system_caret_hwnd.
+
 2002-01-22  Richard M. Stallman  <rms@gnu.org>
 
        * unexelf.c (unexec): Define n so as to cause compilation error
index 9648758d7c7aacf2faf97da568e659c6173a2215..b7b2c96e55386b3ebaf37837183b2ca69a287bef 100644 (file)
@@ -594,7 +594,8 @@ x_update_window_begin (w)
   struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f);
 
   /* Hide the system caret during an update.  */
-  SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0);
+  if (w32_use_visible_system_caret)
+    SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0);
 
   updated_window = w;
   set_output_cursor (&w->cursor);
@@ -720,7 +721,8 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
   /* Unhide the caret.  This won't actually show the cursor, unless it
      was visible before the corresponding call to HideCaret in
      x_update_window_begin.  */
-  SendMessage (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0);
+  if (w32_use_visible_system_caret)
+    SendMessage (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0);
 
   updated_window = NULL;
 }
@@ -7857,7 +7859,7 @@ my_create_scrollbar (f, bar)
                             (LPARAM) bar);
 }
 
-//#define ATTACH_THREADS
+/*#define ATTACH_THREADS*/
 
 BOOL
 my_show_window (FRAME_PTR f, HWND hwnd, int how)
@@ -8111,7 +8113,7 @@ w32_set_vertical_scroll_bar (w, portion, whole, position)
             SetScrollRange (hwnd, SB_CTL, 0,
                             VERTICAL_SCROLL_BAR_TOP_RANGE (f, height), FALSE);
           my_show_window (f, hwnd, SW_NORMAL);
-          //  InvalidateRect (w, NULL, FALSE);
+          /* InvalidateRect (w, NULL, FALSE);  */
 
           /* Remember new settings.  */
           XSETINT (bar->left, sb_left);
@@ -11178,8 +11180,9 @@ the cursor have no effect.  */);
 
   /* Initialize w32_use_visible_system_caret based on whether a screen
      reader is in use.  */
-  SystemParametersInfo (SPI_GETSCREENREADER, 0,
-                       &w32_use_visible_system_caret, 0);
+  if (!SystemParametersInfo (SPI_GETSCREENREADER, 0,
+                            &w32_use_visible_system_caret, 0))
+    w32_use_visible_system_caret = 0;
 
   DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p,
               doc: /* *Non-nil means draw block cursor as wide as the glyph under it.