aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2002-01-23 22:03:26 +0000
committerJason Rumney2002-01-23 22:03:26 +0000
commitab76d3768051bb2ddc2a48ffafd092619f685119 (patch)
tree50ee8ccb2444f011df34fb41ebdec0dbce946d8c
parentd285988b2da86b096ff24c9a627eb5b1ad81804d (diff)
downloademacs-ab76d3768051bb2ddc2a48ffafd092619f685119.tar.gz
emacs-ab76d3768051bb2ddc2a48ffafd092619f685119.zip
(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.
-rw-r--r--src/ChangeLog10
-rw-r--r--src/w32term.c15
2 files changed, 19 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 92a7ed4ec09..2095530c7ad 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12002-01-23 Jason Rumney <jasonr@gnu.org>
2
3 * w32term.c (x_update_window_begin): Only hide caret if
4 w32_use_visible_system_caret is set.
5 (x_update_window_end): Only show caret if
6 w32_use_visible_system_caret is set.
7 (syms_of_w32term): Handle SystemParametersInfo call failing.
8
9 * w32fns.c (syms_of_w32fns): Initialize w32_visible_system_caret_hwnd.
10
12002-01-22 Richard M. Stallman <rms@gnu.org> 112002-01-22 Richard M. Stallman <rms@gnu.org>
2 12
3 * unexelf.c (unexec): Define n so as to cause compilation error 13 * unexelf.c (unexec): Define n so as to cause compilation error
diff --git a/src/w32term.c b/src/w32term.c
index 9648758d7c7..b7b2c96e553 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -594,7 +594,8 @@ x_update_window_begin (w)
594 struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); 594 struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f);
595 595
596 /* Hide the system caret during an update. */ 596 /* Hide the system caret during an update. */
597 SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0); 597 if (w32_use_visible_system_caret)
598 SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0);
598 599
599 updated_window = w; 600 updated_window = w;
600 set_output_cursor (&w->cursor); 601 set_output_cursor (&w->cursor);
@@ -720,7 +721,8 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
720 /* Unhide the caret. This won't actually show the cursor, unless it 721 /* Unhide the caret. This won't actually show the cursor, unless it
721 was visible before the corresponding call to HideCaret in 722 was visible before the corresponding call to HideCaret in
722 x_update_window_begin. */ 723 x_update_window_begin. */
723 SendMessage (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0); 724 if (w32_use_visible_system_caret)
725 SendMessage (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0);
724 726
725 updated_window = NULL; 727 updated_window = NULL;
726} 728}
@@ -7857,7 +7859,7 @@ my_create_scrollbar (f, bar)
7857 (LPARAM) bar); 7859 (LPARAM) bar);
7858} 7860}
7859 7861
7860//#define ATTACH_THREADS 7862/*#define ATTACH_THREADS*/
7861 7863
7862BOOL 7864BOOL
7863my_show_window (FRAME_PTR f, HWND hwnd, int how) 7865my_show_window (FRAME_PTR f, HWND hwnd, int how)
@@ -8111,7 +8113,7 @@ w32_set_vertical_scroll_bar (w, portion, whole, position)
8111 SetScrollRange (hwnd, SB_CTL, 0, 8113 SetScrollRange (hwnd, SB_CTL, 0,
8112 VERTICAL_SCROLL_BAR_TOP_RANGE (f, height), FALSE); 8114 VERTICAL_SCROLL_BAR_TOP_RANGE (f, height), FALSE);
8113 my_show_window (f, hwnd, SW_NORMAL); 8115 my_show_window (f, hwnd, SW_NORMAL);
8114 // InvalidateRect (w, NULL, FALSE); 8116 /* InvalidateRect (w, NULL, FALSE); */
8115 8117
8116 /* Remember new settings. */ 8118 /* Remember new settings. */
8117 XSETINT (bar->left, sb_left); 8119 XSETINT (bar->left, sb_left);
@@ -11178,8 +11180,9 @@ the cursor have no effect. */);
11178 11180
11179 /* Initialize w32_use_visible_system_caret based on whether a screen 11181 /* Initialize w32_use_visible_system_caret based on whether a screen
11180 reader is in use. */ 11182 reader is in use. */
11181 SystemParametersInfo (SPI_GETSCREENREADER, 0, 11183 if (!SystemParametersInfo (SPI_GETSCREENREADER, 0,
11182 &w32_use_visible_system_caret, 0); 11184 &w32_use_visible_system_caret, 0))
11185 w32_use_visible_system_caret = 0;
11183 11186
11184 DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p, 11187 DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p,
11185 doc: /* *Non-nil means draw block cursor as wide as the glyph under it. 11188 doc: /* *Non-nil means draw block cursor as wide as the glyph under it.