diff options
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/w32term.c b/src/w32term.c index a93482672cc..d539d53e691 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5160,13 +5160,14 @@ w32_clear_frame_area (f, x, y, width, height) | |||
| 5160 | /* RIF: Draw or clear cursor on window W. */ | 5160 | /* RIF: Draw or clear cursor on window W. */ |
| 5161 | 5161 | ||
| 5162 | static void | 5162 | static void |
| 5163 | w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_width) | 5163 | w32_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p) |
| 5164 | struct window *w; | 5164 | struct window *w; |
| 5165 | struct glyph_row *glyph_row; | 5165 | struct glyph_row *glyph_row; |
| 5166 | int on, x, y; | 5166 | int x, y; |
| 5167 | int new_cursor_type, new_cursor_width; | 5167 | int cursor_type, cursor_width; |
| 5168 | int on_p, active_p; | ||
| 5168 | { | 5169 | { |
| 5169 | if (on) | 5170 | if (on_p) |
| 5170 | { | 5171 | { |
| 5171 | /* If the user wants to use the system caret, make sure our own | 5172 | /* If the user wants to use the system caret, make sure our own |
| 5172 | cursor remains invisible. */ | 5173 | cursor remains invisible. */ |
| @@ -5175,12 +5176,12 @@ w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_widt | |||
| 5175 | if (w->phys_cursor_type != NO_CURSOR) | 5176 | if (w->phys_cursor_type != NO_CURSOR) |
| 5176 | erase_phys_cursor (w); | 5177 | erase_phys_cursor (w); |
| 5177 | 5178 | ||
| 5178 | new_cursor_type = w->phys_cursor_type = NO_CURSOR; | 5179 | cursor_type = w->phys_cursor_type = NO_CURSOR; |
| 5179 | w->phys_cursor_width = -1; | 5180 | w->phys_cursor_width = -1; |
| 5180 | } | 5181 | } |
| 5181 | else | 5182 | else |
| 5182 | { | 5183 | { |
| 5183 | w->phys_cursor_type = new_cursor_type; | 5184 | w->phys_cursor_type = cursor_type; |
| 5184 | } | 5185 | } |
| 5185 | 5186 | ||
| 5186 | w->phys_cursor_on_p = 1; | 5187 | w->phys_cursor_on_p = 1; |
| @@ -5188,7 +5189,7 @@ w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_widt | |||
| 5188 | /* If this is the active cursor, we need to track it with the | 5189 | /* If this is the active cursor, we need to track it with the |
| 5189 | system caret, so third party software like screen magnifiers | 5190 | system caret, so third party software like screen magnifiers |
| 5190 | and speech synthesizers can follow the cursor. */ | 5191 | and speech synthesizers can follow the cursor. */ |
| 5191 | if (active_cursor) | 5192 | if (active_p) |
| 5192 | { | 5193 | { |
| 5193 | HWND hwnd = FRAME_W32_WINDOW (f); | 5194 | HWND hwnd = FRAME_W32_WINDOW (f); |
| 5194 | 5195 | ||
| @@ -5210,7 +5211,7 @@ w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_widt | |||
| 5210 | PostMessage (hwnd, WM_EMACS_TRACK_CARET, 0, 0); | 5211 | PostMessage (hwnd, WM_EMACS_TRACK_CARET, 0, 0); |
| 5211 | } | 5212 | } |
| 5212 | 5213 | ||
| 5213 | switch (new_cursor_type) | 5214 | switch (cursor_type) |
| 5214 | { | 5215 | { |
| 5215 | case HOLLOW_BOX_CURSOR: | 5216 | case HOLLOW_BOX_CURSOR: |
| 5216 | x_draw_hollow_cursor (w, glyph_row); | 5217 | x_draw_hollow_cursor (w, glyph_row); |
| @@ -5221,11 +5222,11 @@ w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_widt | |||
| 5221 | break; | 5222 | break; |
| 5222 | 5223 | ||
| 5223 | case BAR_CURSOR: | 5224 | case BAR_CURSOR: |
| 5224 | x_draw_bar_cursor (w, glyph_row, new_cursor_width, BAR_CURSOR); | 5225 | x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR); |
| 5225 | break; | 5226 | break; |
| 5226 | 5227 | ||
| 5227 | case HBAR_CURSOR: | 5228 | case HBAR_CURSOR: |
| 5228 | x_draw_bar_cursor (w, glyph_row, new_cursor_width, HBAR_CURSOR); | 5229 | x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR); |
| 5229 | break; | 5230 | break; |
| 5230 | 5231 | ||
| 5231 | case NO_CURSOR: | 5232 | case NO_CURSOR: |