Mercurial > emacs
comparison src/w32term.c @ 42919:2a546583564f
(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.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Wed, 23 Jan 2002 21:59:23 +0000 |
parents | c1af6a7f3dd4 |
children | b3ee5e92548a |
comparison
equal
deleted
inserted
replaced
42918:9b06036a8c5e | 42919:2a546583564f |
---|---|
592 { | 592 { |
593 struct frame *f = XFRAME (WINDOW_FRAME (w)); | 593 struct frame *f = XFRAME (WINDOW_FRAME (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); |
601 | 602 |
602 BLOCK_INPUT; | 603 BLOCK_INPUT; |
718 } | 719 } |
719 | 720 |
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 } |
727 | 729 |
728 | 730 |
7855 return (HWND) SendMessage (FRAME_W32_WINDOW (f), | 7857 return (HWND) SendMessage (FRAME_W32_WINDOW (f), |
7856 WM_EMACS_CREATESCROLLBAR, (WPARAM) f, | 7858 WM_EMACS_CREATESCROLLBAR, (WPARAM) f, |
7857 (LPARAM) bar); | 7859 (LPARAM) bar); |
7858 } | 7860 } |
7859 | 7861 |
7860 //#define ATTACH_THREADS | 7862 /*#define ATTACH_THREADS*/ |
7861 | 7863 |
7862 BOOL | 7864 BOOL |
7863 my_show_window (FRAME_PTR f, HWND hwnd, int how) | 7865 my_show_window (FRAME_PTR f, HWND hwnd, int how) |
7864 { | 7866 { |
7865 #ifndef ATTACH_THREADS | 7867 #ifndef ATTACH_THREADS |
8109 } | 8111 } |
8110 else | 8112 else |
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); |
8118 XSETINT (bar->top, top); | 8120 XSETINT (bar->top, top); |
8119 XSETINT (bar->width, sb_width); | 8121 XSETINT (bar->width, sb_width); |
11176 When this variable is set, other variables affecting the appearance of | 11178 When this variable is set, other variables affecting the appearance of |
11177 the cursor have no effect. */); | 11179 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. |
11186 For example, if a block cursor is over a tab, it will be drawn as | 11189 For example, if a block cursor is over a tab, it will be drawn as |
11187 wide as that tab on the display. */); | 11190 wide as that tab on the display. */); |