aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2002-02-16 23:55:57 +0000
committerKim F. Storm <[email protected]>2002-02-16 23:55:57 +0000
commit663010611d7a551ae9c444ef47f37b057324a87b (patch)
tree7c6b9ad04a2b05824e509f3698de4fbe70e51449 /src/xterm.c
parent64421b63fc3cc61368eb03148411d35ae8df194f (diff)
(disable_mouse_highlight): Removed variable.
(note_mouse_highlight): Don't highlight if Vmouse_highlight is nil. (show_mouse_face): Don't show highlight if mouse_face_hidden is set. (XTread_socket): Turn mouse_face_hidden off after mouse movement, and on after keyboard input. (x_term_init): Initialize mouse_face_hidden.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 4de1f5fc72..3e790d0aba 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6686,11 +6686,6 @@ note_mouse_movement (frame, event)
}
}
-/* This is used for debugging, to turn off note_mouse_highlight. */
-
-int disable_mouse_highlight;
-
-
/************************************************************************
Mouse Face
@@ -6908,7 +6903,7 @@ note_mouse_highlight (f, x, y)
return;
#endif
- if (disable_mouse_highlight
+ if (NILP (Vmouse_highlight)
|| !f->glyphs_initialized_p)
return;
@@ -7814,6 +7809,8 @@ show_mouse_face (dpyinfo, draw)
if (/* If window is in the process of being destroyed, don't bother
to do anything. */
w->current_matrix != NULL
+ /* Don't update mouse highlight if hidden */
+ && (draw != DRAW_MOUSE_FACE || !dpyinfo->mouse_face_hidden)
/* Recognize when we are called to operate on rows that don't exist
anymore. This can happen when a window is split. */
&& dpyinfo->mouse_face_end_row < w->current_matrix->nrows)
@@ -10454,6 +10451,12 @@ XTread_socket (sd, bufp, numchars, expected)
case KeyPress:
f = x_any_window_to_frame (dpyinfo, event.xkey.window);
+ if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight))
+ {
+ dpyinfo->mouse_face_hidden = 1;
+ clear_mouse_face (dpyinfo);
+ }
+
#if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS
if (f == 0)
{
@@ -10866,6 +10869,12 @@ XTread_socket (sd, bufp, numchars, expected)
else
f = x_window_to_frame (dpyinfo, event.xmotion.window);
+ if (dpyinfo->mouse_face_hidden)
+ {
+ dpyinfo->mouse_face_hidden = 0;
+ clear_mouse_face (dpyinfo);
+ }
+
if (f)
note_mouse_movement (f, &event.xmotion);
else
@@ -14680,6 +14689,7 @@ x_term_init (display_name, xrm_option, resource_name)
dpyinfo->mouse_face_overlay = Qnil;
dpyinfo->mouse_face_mouse_x = dpyinfo->mouse_face_mouse_y = 0;
dpyinfo->mouse_face_defer = 0;
+ dpyinfo->mouse_face_hidden = 0;
dpyinfo->x_focus_frame = 0;
dpyinfo->x_focus_event_frame = 0;
dpyinfo->x_highlight_frame = 0;