Mercurial > emacs
changeset 43371:263456abbeb0
(disable_mouse_highlight): Removed variable.
(show_mouse_face): Don't show highlight if mouse_face_hidden is set.
(IT_note_mouse_highlight): Don't highlight if Vmouse_highlight is nil.
(internal_terminal_init): Initialize mouse_face_hidden.
(dos_rawgetc): Turn mouse_face_hidden off after mouse movement,
and on after keyboard input.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sat, 16 Feb 2002 23:57:34 +0000 |
parents | 9a4630ba3eae |
children | e1a8a3f02251 |
files | src/msdos.c |
diffstat | 1 files changed, 20 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/msdos.c Sat Feb 16 23:56:41 2002 +0000 +++ b/src/msdos.c Sat Feb 16 23:57:34 2002 +0000 @@ -1181,9 +1181,6 @@ Mouse Highlight (and friends..) ************************************************************************/ -/* This is used for debugging, to turn off note_mouse_highlight. */ -int disable_mouse_highlight; - /* If non-nil, dos_rawgetc generates an event to display that string. (The display is done in keyboard.c:read_char, by calling show_help_echo.) */ @@ -1242,6 +1239,9 @@ /* There's no sense to do anything if the mouse face isn't realized. */ if (hl > 0) { + if (dpyinfo->mouse_face_hidden) + goto set_cursor_shape; + fp = FACE_FROM_ID (SELECTED_FRAME(), dpyinfo->mouse_face_face_id); if (!fp) goto set_cursor_shape; @@ -1496,7 +1496,7 @@ if (mouse_preempted) return; - if (disable_mouse_highlight + if (NILP (Vmouse_highlight) || !f->glyphs_initialized_p) return; @@ -2591,6 +2591,7 @@ the_only_x_display.display_info.mouse_face_mouse_x = the_only_x_display.display_info.mouse_face_mouse_y = 0; the_only_x_display.display_info.mouse_face_defer = 0; + the_only_x_display.display_info.mouse_face_hidden = 0; init_frame_faces (sf); @@ -3161,6 +3162,7 @@ { struct input_event event; union REGS regs; + struct display_info *dpyinfo = FRAME_X_DISPLAY_INFO (SELECTED_FRAME()); #ifndef HAVE_X_WINDOWS /* Maybe put the cursor where it should be. */ @@ -3370,7 +3372,13 @@ make_event: if (code == 0) continue; - + + if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) + { + dpyinfo->mouse_face_hidden = 1; + clear_mouse_face (dpyinfo); + } + if (code >= 0x100) event.kind = non_ascii_keystroke; else @@ -3395,6 +3403,12 @@ might need to update mouse highlight. */ if (mouse_last_x != mouse_prev_x || mouse_last_y != mouse_prev_y) { + if (dpyinfo->mouse_face_hidden) + { + dpyinfo->mouse_face_hidden = 0; + clear_mouse_face (dpyinfo); + } + if (x_autoselect_window_p) { int mouse_area; @@ -3419,6 +3433,7 @@ } else last_mouse_window = Qnil; + previous_help_echo = help_echo; help_echo = help_echo_object = help_echo_window = Qnil; help_echo_pos = -1;