aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2002-02-16 23:57:34 +0000
committerKim F. Storm2002-02-16 23:57:34 +0000
commitabf10ed7000ee33f142acd3f97f338ecb9a3237e (patch)
tree08ceeaa5b3e87a4293e66c624abfd642dca2a4d9 /src
parent11690c8e1bcd0b015ab6bdcd253132e398891485 (diff)
downloademacs-abf10ed7000ee33f142acd3f97f338ecb9a3237e.tar.gz
emacs-abf10ed7000ee33f142acd3f97f338ecb9a3237e.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/msdos.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/msdos.c b/src/msdos.c
index 19304db32e8..c13ef2abb5c 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1181,9 +1181,6 @@ IT_write_glyphs (struct glyph *str, int str_len)
1181 Mouse Highlight (and friends..) 1181 Mouse Highlight (and friends..)
1182 ************************************************************************/ 1182 ************************************************************************/
1183 1183
1184/* This is used for debugging, to turn off note_mouse_highlight. */
1185int disable_mouse_highlight;
1186
1187/* If non-nil, dos_rawgetc generates an event to display that string. 1184/* If non-nil, dos_rawgetc generates an event to display that string.
1188 (The display is done in keyboard.c:read_char, by calling 1185 (The display is done in keyboard.c:read_char, by calling
1189 show_help_echo.) */ 1186 show_help_echo.) */
@@ -1242,6 +1239,9 @@ show_mouse_face (struct display_info *dpyinfo, int hl)
1242 /* There's no sense to do anything if the mouse face isn't realized. */ 1239 /* There's no sense to do anything if the mouse face isn't realized. */
1243 if (hl > 0) 1240 if (hl > 0)
1244 { 1241 {
1242 if (dpyinfo->mouse_face_hidden)
1243 goto set_cursor_shape;
1244
1245 fp = FACE_FROM_ID (SELECTED_FRAME(), dpyinfo->mouse_face_face_id); 1245 fp = FACE_FROM_ID (SELECTED_FRAME(), dpyinfo->mouse_face_face_id);
1246 if (!fp) 1246 if (!fp)
1247 goto set_cursor_shape; 1247 goto set_cursor_shape;
@@ -1496,7 +1496,7 @@ IT_note_mouse_highlight (struct frame *f, int x, int y)
1496 if (mouse_preempted) 1496 if (mouse_preempted)
1497 return; 1497 return;
1498 1498
1499 if (disable_mouse_highlight 1499 if (NILP (Vmouse_highlight)
1500 || !f->glyphs_initialized_p) 1500 || !f->glyphs_initialized_p)
1501 return; 1501 return;
1502 1502
@@ -2591,6 +2591,7 @@ internal_terminal_init ()
2591 the_only_x_display.display_info.mouse_face_mouse_x = 2591 the_only_x_display.display_info.mouse_face_mouse_x =
2592 the_only_x_display.display_info.mouse_face_mouse_y = 0; 2592 the_only_x_display.display_info.mouse_face_mouse_y = 0;
2593 the_only_x_display.display_info.mouse_face_defer = 0; 2593 the_only_x_display.display_info.mouse_face_defer = 0;
2594 the_only_x_display.display_info.mouse_face_hidden = 0;
2594 2595
2595 init_frame_faces (sf); 2596 init_frame_faces (sf);
2596 2597
@@ -3161,6 +3162,7 @@ dos_rawgetc ()
3161{ 3162{
3162 struct input_event event; 3163 struct input_event event;
3163 union REGS regs; 3164 union REGS regs;
3165 struct display_info *dpyinfo = FRAME_X_DISPLAY_INFO (SELECTED_FRAME());
3164 3166
3165#ifndef HAVE_X_WINDOWS 3167#ifndef HAVE_X_WINDOWS
3166 /* Maybe put the cursor where it should be. */ 3168 /* Maybe put the cursor where it should be. */
@@ -3370,7 +3372,13 @@ dos_rawgetc ()
3370 make_event: 3372 make_event:
3371 if (code == 0) 3373 if (code == 0)
3372 continue; 3374 continue;
3373 3375
3376 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight))
3377 {
3378 dpyinfo->mouse_face_hidden = 1;
3379 clear_mouse_face (dpyinfo);
3380 }
3381
3374 if (code >= 0x100) 3382 if (code >= 0x100)
3375 event.kind = non_ascii_keystroke; 3383 event.kind = non_ascii_keystroke;
3376 else 3384 else
@@ -3395,6 +3403,12 @@ dos_rawgetc ()
3395 might need to update mouse highlight. */ 3403 might need to update mouse highlight. */
3396 if (mouse_last_x != mouse_prev_x || mouse_last_y != mouse_prev_y) 3404 if (mouse_last_x != mouse_prev_x || mouse_last_y != mouse_prev_y)
3397 { 3405 {
3406 if (dpyinfo->mouse_face_hidden)
3407 {
3408 dpyinfo->mouse_face_hidden = 0;
3409 clear_mouse_face (dpyinfo);
3410 }
3411
3398 if (x_autoselect_window_p) 3412 if (x_autoselect_window_p)
3399 { 3413 {
3400 int mouse_area; 3414 int mouse_area;
@@ -3419,6 +3433,7 @@ dos_rawgetc ()
3419 } 3433 }
3420 else 3434 else
3421 last_mouse_window = Qnil; 3435 last_mouse_window = Qnil;
3436
3422 previous_help_echo = help_echo; 3437 previous_help_echo = help_echo;
3423 help_echo = help_echo_object = help_echo_window = Qnil; 3438 help_echo = help_echo_object = help_echo_window = Qnil;
3424 help_echo_pos = -1; 3439 help_echo_pos = -1;