diff options
| author | Dmitry Antipov | 2013-08-27 07:52:21 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-27 07:52:21 +0400 |
| commit | 9fed97293c8bc78eef679db1ae3cab468ecc473e (patch) | |
| tree | 679239fa933440b9192c8503704f1b35bc885303 /src/w32term.c | |
| parent | 9e89d835b04c20a8cd3dfad452fa827d675b0938 (diff) | |
| download | emacs-9fed97293c8bc78eef679db1ae3cab468ecc473e.tar.gz emacs-9fed97293c8bc78eef679db1ae3cab468ecc473e.zip | |
* lisp.h (Mouse_HLInfo): Move from here...
* dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
(reset_mouse_highlight): New function.
* msdos.c (dos_set_window_size, IT_update_begin)
(internal_terminal_init):
* nsterm.m (ns_update_window_end, x_free_frame_resources)
(ns_initialize_display_info):
* w32console.c (initialize_w32_display):
* w32term.c (x_update_window_end, x_free_frame_resources)
(w32_initialize_display_info):
* xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
* window.c (Fdelete_other_windows_internal):
* xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
* termchar.h (toplevel):
* xterm.h (toplevel): Include dispextern.h.
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/w32term.c b/src/w32term.c index 7a15323551b..ba3aadd0b49 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -678,8 +678,6 @@ static void | |||
| 678 | x_update_window_end (struct window *w, bool cursor_on_p, | 678 | x_update_window_end (struct window *w, bool cursor_on_p, |
| 679 | bool mouse_face_overwritten_p) | 679 | bool mouse_face_overwritten_p) |
| 680 | { | 680 | { |
| 681 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); | ||
| 682 | |||
| 683 | if (!w->pseudo_window_p) | 681 | if (!w->pseudo_window_p) |
| 684 | { | 682 | { |
| 685 | block_input (); | 683 | block_input (); |
| @@ -698,11 +696,7 @@ x_update_window_end (struct window *w, bool cursor_on_p, | |||
| 698 | /* If a row with mouse-face was overwritten, arrange for | 696 | /* If a row with mouse-face was overwritten, arrange for |
| 699 | XTframe_up_to_date to redisplay the mouse highlight. */ | 697 | XTframe_up_to_date to redisplay the mouse highlight. */ |
| 700 | if (mouse_face_overwritten_p) | 698 | if (mouse_face_overwritten_p) |
| 701 | { | 699 | reset_mouse_highlight (MOUSE_HL_INFO (XFRAME (w->frame))); |
| 702 | hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; | ||
| 703 | hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; | ||
| 704 | hlinfo->mouse_face_window = Qnil; | ||
| 705 | } | ||
| 706 | 700 | ||
| 707 | /* Unhide the caret. This won't actually show the cursor, unless it | 701 | /* Unhide the caret. This won't actually show the cursor, unless it |
| 708 | was visible before the corresponding call to HideCaret in | 702 | was visible before the corresponding call to HideCaret in |
| @@ -6156,16 +6150,8 @@ x_free_frame_resources (struct frame *f) | |||
| 6156 | dpyinfo->w32_focus_event_frame = 0; | 6150 | dpyinfo->w32_focus_event_frame = 0; |
| 6157 | if (f == dpyinfo->x_highlight_frame) | 6151 | if (f == dpyinfo->x_highlight_frame) |
| 6158 | dpyinfo->x_highlight_frame = 0; | 6152 | dpyinfo->x_highlight_frame = 0; |
| 6159 | |||
| 6160 | if (f == hlinfo->mouse_face_mouse_frame) | 6153 | if (f == hlinfo->mouse_face_mouse_frame) |
| 6161 | { | 6154 | reset_mouse_highlight (hlinfo); |
| 6162 | hlinfo->mouse_face_beg_row | ||
| 6163 | = hlinfo->mouse_face_beg_col = -1; | ||
| 6164 | hlinfo->mouse_face_end_row | ||
| 6165 | = hlinfo->mouse_face_end_col = -1; | ||
| 6166 | hlinfo->mouse_face_window = Qnil; | ||
| 6167 | hlinfo->mouse_face_mouse_frame = 0; | ||
| 6168 | } | ||
| 6169 | 6155 | ||
| 6170 | unblock_input (); | 6156 | unblock_input (); |
| 6171 | } | 6157 | } |
| @@ -6235,7 +6221,6 @@ void | |||
| 6235 | w32_initialize_display_info (Lisp_Object display_name) | 6221 | w32_initialize_display_info (Lisp_Object display_name) |
| 6236 | { | 6222 | { |
| 6237 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 6223 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| 6238 | Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; | ||
| 6239 | 6224 | ||
| 6240 | memset (dpyinfo, 0, sizeof (*dpyinfo)); | 6225 | memset (dpyinfo, 0, sizeof (*dpyinfo)); |
| 6241 | 6226 | ||
| @@ -6258,17 +6243,10 @@ w32_initialize_display_info (Lisp_Object display_name) | |||
| 6258 | dpyinfo->n_fonts = 0; | 6243 | dpyinfo->n_fonts = 0; |
| 6259 | dpyinfo->smallest_font_height = 1; | 6244 | dpyinfo->smallest_font_height = 1; |
| 6260 | dpyinfo->smallest_char_width = 1; | 6245 | dpyinfo->smallest_char_width = 1; |
| 6261 | |||
| 6262 | hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; | ||
| 6263 | hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; | ||
| 6264 | hlinfo->mouse_face_face_id = DEFAULT_FACE_ID; | ||
| 6265 | hlinfo->mouse_face_window = Qnil; | ||
| 6266 | hlinfo->mouse_face_overlay = Qnil; | ||
| 6267 | hlinfo->mouse_face_hidden = 0; | ||
| 6268 | |||
| 6269 | dpyinfo->vertical_scroll_bar_cursor = w32_load_cursor (IDC_ARROW); | 6246 | dpyinfo->vertical_scroll_bar_cursor = w32_load_cursor (IDC_ARROW); |
| 6270 | /* TODO: dpyinfo->gray */ | 6247 | /* TODO: dpyinfo->gray */ |
| 6271 | 6248 | ||
| 6249 | reset_mouse_highlight (&dpyinfo->mouse_highlight); | ||
| 6272 | } | 6250 | } |
| 6273 | 6251 | ||
| 6274 | /* Create an xrdb-style database of resources to supersede registry settings. | 6252 | /* Create an xrdb-style database of resources to supersede registry settings. |