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.) */
/* 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;
if (mouse_preempted)
return;
- if (disable_mouse_highlight
+ if (NILP (Vmouse_highlight)
|| !f->glyphs_initialized_p)
return;
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);
{
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. */
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
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;
}
else
last_mouse_window = Qnil;
+
previous_help_echo = help_echo;
help_echo = help_echo_object = help_echo_window = Qnil;
help_echo_pos = -1;