aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2002-02-16 23:55:57 +0000
committerKim F. Storm2002-02-16 23:55:57 +0000
commit663010611d7a551ae9c444ef47f37b057324a87b (patch)
tree7c6b9ad04a2b05824e509f3698de4fbe70e51449 /src
parent64421b63fc3cc61368eb03148411d35ae8df194f (diff)
downloademacs-663010611d7a551ae9c444ef47f37b057324a87b.tar.gz
emacs-663010611d7a551ae9c444ef47f37b057324a87b.zip
(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')
-rw-r--r--src/xterm.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 4de1f5fc721..3e790d0aba0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6686,11 +6686,6 @@ note_mouse_movement (frame, event)
6686 } 6686 }
6687} 6687}
6688 6688
6689/* This is used for debugging, to turn off note_mouse_highlight. */
6690
6691int disable_mouse_highlight;
6692
6693
6694 6689
6695/************************************************************************ 6690/************************************************************************
6696 Mouse Face 6691 Mouse Face
@@ -6908,7 +6903,7 @@ note_mouse_highlight (f, x, y)
6908 return; 6903 return;
6909#endif 6904#endif
6910 6905
6911 if (disable_mouse_highlight 6906 if (NILP (Vmouse_highlight)
6912 || !f->glyphs_initialized_p) 6907 || !f->glyphs_initialized_p)
6913 return; 6908 return;
6914 6909
@@ -7814,6 +7809,8 @@ show_mouse_face (dpyinfo, draw)
7814 if (/* If window is in the process of being destroyed, don't bother 7809 if (/* If window is in the process of being destroyed, don't bother
7815 to do anything. */ 7810 to do anything. */
7816 w->current_matrix != NULL 7811 w->current_matrix != NULL
7812 /* Don't update mouse highlight if hidden */
7813 && (draw != DRAW_MOUSE_FACE || !dpyinfo->mouse_face_hidden)
7817 /* Recognize when we are called to operate on rows that don't exist 7814 /* Recognize when we are called to operate on rows that don't exist
7818 anymore. This can happen when a window is split. */ 7815 anymore. This can happen when a window is split. */
7819 && dpyinfo->mouse_face_end_row < w->current_matrix->nrows) 7816 && dpyinfo->mouse_face_end_row < w->current_matrix->nrows)
@@ -10454,6 +10451,12 @@ XTread_socket (sd, bufp, numchars, expected)
10454 case KeyPress: 10451 case KeyPress:
10455 f = x_any_window_to_frame (dpyinfo, event.xkey.window); 10452 f = x_any_window_to_frame (dpyinfo, event.xkey.window);
10456 10453
10454 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight))
10455 {
10456 dpyinfo->mouse_face_hidden = 1;
10457 clear_mouse_face (dpyinfo);
10458 }
10459
10457#if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS 10460#if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS
10458 if (f == 0) 10461 if (f == 0)
10459 { 10462 {
@@ -10866,6 +10869,12 @@ XTread_socket (sd, bufp, numchars, expected)
10866 else 10869 else
10867 f = x_window_to_frame (dpyinfo, event.xmotion.window); 10870 f = x_window_to_frame (dpyinfo, event.xmotion.window);
10868 10871
10872 if (dpyinfo->mouse_face_hidden)
10873 {
10874 dpyinfo->mouse_face_hidden = 0;
10875 clear_mouse_face (dpyinfo);
10876 }
10877
10869 if (f) 10878 if (f)
10870 note_mouse_movement (f, &event.xmotion); 10879 note_mouse_movement (f, &event.xmotion);
10871 else 10880 else
@@ -14680,6 +14689,7 @@ x_term_init (display_name, xrm_option, resource_name)
14680 dpyinfo->mouse_face_overlay = Qnil; 14689 dpyinfo->mouse_face_overlay = Qnil;
14681 dpyinfo->mouse_face_mouse_x = dpyinfo->mouse_face_mouse_y = 0; 14690 dpyinfo->mouse_face_mouse_x = dpyinfo->mouse_face_mouse_y = 0;
14682 dpyinfo->mouse_face_defer = 0; 14691 dpyinfo->mouse_face_defer = 0;
14692 dpyinfo->mouse_face_hidden = 0;
14683 dpyinfo->x_focus_frame = 0; 14693 dpyinfo->x_focus_frame = 0;
14684 dpyinfo->x_focus_event_frame = 0; 14694 dpyinfo->x_focus_event_frame = 0;
14685 dpyinfo->x_highlight_frame = 0; 14695 dpyinfo->x_highlight_frame = 0;