comparison src/w32term.c @ 111413:d53ee71e7e89

Unify mouse-highlight code for all GUI and TTY sessions. term.c: Remove static mouse_face_* variables. All users changed. (term_show_mouse_face, term_clear_mouse_face) (fast_find_position, term_mouse_highlight): Functions deleted. (tty_draw_row_with_mouse_face): New function. (term_mouse_movement): Call note_mouse_highlight instead of term_mouse_highlight. nsterm.m (ns_update_window_begin, ns_update_window_end) (ns_update_end, x_destroy_window, ns_frame_up_to_date) (ns_dumpglyphs_box_or_relief, ns_maybe_dumpglyphs_background) (ns_dumpglyphs_image, ns_dumpglyphs_stretch) (ns_initialize_display_info, keyDown, mouseMoved, mouseExited): Replace Display_Info with Mouse_HLInfo everywhere where mouse_face_* members were accessed for mouse highlight purposes. xterm.c (x_update_window_begin, x_update_window_end) (x_update_end, XTframe_up_to_date, x_set_mouse_face_gc) (handle_one_xevent, x_free_frame_resources, x_term_init): Replace Display_Info with Mouse_HLInfo everywhere where mouse_face_* members were accessed for mouse highlight purposes. w32term.c (x_update_window_begin, x_update_window_end) (x_update_end, w32_read_socket, x_free_frame_resources) (w32_initialize_display_info): Replace Display_Info with Mouse_HLInfo everywhere where mouse_face_* members were accessed for mouse highlight purposes. xdisp.c (show_mouse_face, note_mode_line_or_margin_highlight) (note_mouse_highlight) [HAVE_WINDOW_SYSTEM]: Don't run GUI code unless the frame is on a window-system. (get_tool_bar_item, handle_tool_bar_click) (note_tool_bar_highlight, draw_glyphs, erase_phys_cursor) (show_mouse_face, clear_mouse_face, coords_in_mouse_face_p) (note_mode_line_or_margin_highlight, note_mouse_highlight) (x_clear_window_mouse_face, cancel_mouse_face, expose_frame): Replace Display_Info with Mouse_HLInfo everywhere where mouse_face_* members were accessed for mouse highlight purposes. (coords_in_mouse_face_p): Move prototype out of the HAVE_WINDOW_SYSTEM conditional. (x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the HAVE_WINDOW_SYSTEM block. (try_window_id) [HAVE_GPM || MSDOS]: Call x_clear_window_mouse_face. (draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM systems. Call tty_draw_row_with_mouse_face for TTY systems. (show_mouse_face): Call draw_row_with_mouse_face, instead of calling draw_glyphs directly. (show_mouse_face, clear_mouse_face, coords_in_mouse_face_p) (cursor_in_mouse_face_p, rows_from_pos_range) (mouse_face_from_buffer_pos, mouse_face_from_string_pos) (note_mode_line_or_margin_highlight, note_mouse_highlight) (x_clear_window_mouse_face, cancel_mouse_face): Move out of the HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific fragments. (note_mouse_highlight): Call popup_activated for MSDOS as well. Clear mouse highlight if pointer is over glyphs whose OBJECT is an integer. (mouse_face_from_buffer_pos): Add parentheses around && within ||. (x_consider_frame_title, tool_bar_lines_needed): Move prototypes to HAVE_WINDOW_SYSTEM-only part. (get_window_cursor_type): Move inside a HAVE_WINDOW_SYSTEM-only part. Remove "#ifdef HAVE_WINDOW_SYSTEM" from body of function. (null_glyph_slice): Move declaration into HAVE_WINDOW_SYSTEM-only part. dispnew.c (mirror_make_current): Set Y coordinate of the mode-line and header-line rows. (init_display): Setup initial frame's output_data for text terminal frames. xmenu.c (popup_activated): Don't define on MSDOS, which now has its own definition on msdos.c. msdos.c (show_mouse_face, clear_mouse_face) (fast_find_position, IT_note_mode_line_highlight) (IT_note_mouse_highlight): Functions deleted. (IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight instead of IT_note_mouse_highlight. (draw_row_with_mouse_face, popup_activated): New functions. (dos_set_window_size, draw_row_with_mouse_face, IT_update_begin) (IT_update_end, IT_frame_up_to_date, internal_terminal_init) (dos_rawgetc): Replace Display_Info with Mouse_HLInfo everywhere where mouse_face_* members were accessed for mouse highlight purposes. msdos.h (initialize_msdos_display): Add prototype. frame.h (MOUSE_HL_INFO): New macro. lisp.h (Mouse_HLInfo): New data type. xterm.h (struct x_display_info): w32term.h (struct w32_display_info): nsterm.h (struct ns_display_info): termchar.h (struct tty_display_info): Use it instead of mouse_face_* members. dispextern.h (show_mouse_face, clear_mouse_face): Update type of 1st argument. (frame_to_window_pixel_xy, note_mouse_highlight) (x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face) (show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of HAVE_WINDOW_SYSTEM conditional. (draw_row_with_mouse_face): Declare prototype. (tty_draw_row_with_mouse_face): Declare prototype.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 06 Nov 2010 10:28:31 +0200
parents 00c31cf912da f79bd5f589f7
children 5c986eef8f0d
comparison
equal deleted inserted replaced
111412:cc7702f421a0 111413:d53ee71e7e89
503 503
504 static void 504 static void
505 x_update_window_begin (struct window *w) 505 x_update_window_begin (struct window *w)
506 { 506 {
507 struct frame *f = XFRAME (WINDOW_FRAME (w)); 507 struct frame *f = XFRAME (WINDOW_FRAME (w));
508 struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); 508 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
509 509
510 /* Hide the system caret during an update. */ 510 /* Hide the system caret during an update. */
511 if (w32_use_visible_system_caret && w32_system_caret_hwnd) 511 if (w32_use_visible_system_caret && w32_system_caret_hwnd)
512 { 512 {
513 SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0); 513 SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0);
516 updated_window = w; 516 updated_window = w;
517 set_output_cursor (&w->cursor); 517 set_output_cursor (&w->cursor);
518 518
519 BLOCK_INPUT; 519 BLOCK_INPUT;
520 520
521 if (f == display_info->mouse_face_mouse_frame) 521 if (f == hlinfo->mouse_face_mouse_frame)
522 { 522 {
523 /* Don't do highlighting for mouse motion during the update. */ 523 /* Don't do highlighting for mouse motion during the update. */
524 display_info->mouse_face_defer = 1; 524 hlinfo->mouse_face_defer = 1;
525 525
526 /* If F needs to be redrawn, simply forget about any prior mouse 526 /* If F needs to be redrawn, simply forget about any prior mouse
527 highlighting. */ 527 highlighting. */
528 if (FRAME_GARBAGED_P (f)) 528 if (FRAME_GARBAGED_P (f))
529 display_info->mouse_face_window = Qnil; 529 hlinfo->mouse_face_window = Qnil;
530 530
531 #if 0 /* Rows in a current matrix containing glyphs in mouse-face have 531 #if 0 /* Rows in a current matrix containing glyphs in mouse-face have
532 their mouse_face_p flag set, which means that they are always 532 their mouse_face_p flag set, which means that they are always
533 unequal to rows in a desired matrix which never have that 533 unequal to rows in a desired matrix which never have that
534 flag set. So, rows containing mouse-face glyphs are never 534 flag set. So, rows containing mouse-face glyphs are never
538 /* Can we tell that this update does not affect the window 538 /* Can we tell that this update does not affect the window
539 where the mouse highlight is? If so, no need to turn off. 539 where the mouse highlight is? If so, no need to turn off.
540 Likewise, don't do anything if the frame is garbaged; 540 Likewise, don't do anything if the frame is garbaged;
541 in that case, the frame's current matrix that we would use 541 in that case, the frame's current matrix that we would use
542 is all wrong, and we will redisplay that line anyway. */ 542 is all wrong, and we will redisplay that line anyway. */
543 if (!NILP (display_info->mouse_face_window) 543 if (!NILP (hlinfo->mouse_face_window)
544 && w == XWINDOW (display_info->mouse_face_window)) 544 && w == XWINDOW (hlinfo->mouse_face_window))
545 { 545 {
546 int i; 546 int i;
547 547
548 for (i = 0; i < w->desired_matrix->nrows; ++i) 548 for (i = 0; i < w->desired_matrix->nrows; ++i)
549 if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i)) 549 if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i))
550 break; 550 break;
551 551
552 if (i < w->desired_matrix->nrows) 552 if (i < w->desired_matrix->nrows)
553 clear_mouse_face (display_info); 553 clear_mouse_face (hlinfo);
554 } 554 }
555 #endif /* 0 */ 555 #endif /* 0 */
556 } 556 }
557 557
558 UNBLOCK_INPUT; 558 UNBLOCK_INPUT;
599 599
600 static void 600 static void
601 x_update_window_end (struct window *w, int cursor_on_p, 601 x_update_window_end (struct window *w, int cursor_on_p,
602 int mouse_face_overwritten_p) 602 int mouse_face_overwritten_p)
603 { 603 {
604 struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (XFRAME (w->frame)); 604 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
605 605
606 if (!w->pseudo_window_p) 606 if (!w->pseudo_window_p)
607 { 607 {
608 BLOCK_INPUT; 608 BLOCK_INPUT;
609 609
620 620
621 /* If a row with mouse-face was overwritten, arrange for 621 /* If a row with mouse-face was overwritten, arrange for
622 XTframe_up_to_date to redisplay the mouse highlight. */ 622 XTframe_up_to_date to redisplay the mouse highlight. */
623 if (mouse_face_overwritten_p) 623 if (mouse_face_overwritten_p)
624 { 624 {
625 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; 625 hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
626 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; 626 hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
627 dpyinfo->mouse_face_window = Qnil; 627 hlinfo->mouse_face_window = Qnil;
628 } 628 }
629 629
630 /* Unhide the caret. This won't actually show the cursor, unless it 630 /* Unhide the caret. This won't actually show the cursor, unless it
631 was visible before the corresponding call to HideCaret in 631 was visible before the corresponding call to HideCaret in
632 x_update_window_begin. */ 632 x_update_window_begin. */
647 { 647 {
648 if (! FRAME_W32_P (f)) 648 if (! FRAME_W32_P (f))
649 return; 649 return;
650 650
651 /* Mouse highlight may be displayed again. */ 651 /* Mouse highlight may be displayed again. */
652 FRAME_W32_DISPLAY_INFO (f)->mouse_face_defer = 0; 652 MOUSE_HL_INFO (f)->mouse_face_defer = 0;
653 } 653 }
654 654
655 655
656 /* This function is called from various places in xdisp.c whenever a 656 /* This function is called from various places in xdisp.c whenever a
657 complete update has been performed. The global variable 657 complete update has been performed. The global variable
660 static void 660 static void
661 w32_frame_up_to_date (struct frame *f) 661 w32_frame_up_to_date (struct frame *f)
662 { 662 {
663 if (FRAME_W32_P (f)) 663 if (FRAME_W32_P (f))
664 { 664 {
665 struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); 665 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
666 666
667 if (dpyinfo->mouse_face_deferred_gc 667 if (hlinfo->mouse_face_deferred_gc
668 || f == dpyinfo->mouse_face_mouse_frame) 668 || f == hlinfo->mouse_face_mouse_frame)
669 { 669 {
670 BLOCK_INPUT; 670 BLOCK_INPUT;
671 if (dpyinfo->mouse_face_mouse_frame) 671 if (hlinfo->mouse_face_mouse_frame)
672 note_mouse_highlight (dpyinfo->mouse_face_mouse_frame, 672 note_mouse_highlight (hlinfo->mouse_face_mouse_frame,
673 dpyinfo->mouse_face_mouse_x, 673 hlinfo->mouse_face_mouse_x,
674 dpyinfo->mouse_face_mouse_y); 674 hlinfo->mouse_face_mouse_y);
675 dpyinfo->mouse_face_deferred_gc = 0; 675 hlinfo->mouse_face_deferred_gc = 0;
676 UNBLOCK_INPUT; 676 UNBLOCK_INPUT;
677 } 677 }
678 } 678 }
679 } 679 }
680 680
997 { 997 {
998 int face_id; 998 int face_id;
999 struct face *face; 999 struct face *face;
1000 1000
1001 /* What face has to be used last for the mouse face? */ 1001 /* What face has to be used last for the mouse face? */
1002 face_id = FRAME_W32_DISPLAY_INFO (s->f)->mouse_face_face_id; 1002 face_id = MOUSE_HL_INFO (s->f)->mouse_face_face_id;
1003 face = FACE_FROM_ID (s->f, face_id); 1003 face = FACE_FROM_ID (s->f, face_id);
1004 if (face == NULL) 1004 if (face == NULL)
1005 face = FACE_FROM_ID (s->f, MOUSE_FACE_ID); 1005 face = FACE_FROM_ID (s->f, MOUSE_FACE_ID);
1006 1006
1007 if (s->first_glyph->type == CHAR_GLYPH) 1007 if (s->first_glyph->type == CHAR_GLYPH)
4058 int count = 0; 4058 int count = 0;
4059 int check_visibility = 0; 4059 int check_visibility = 0;
4060 W32Msg msg; 4060 W32Msg msg;
4061 struct frame *f; 4061 struct frame *f;
4062 struct w32_display_info *dpyinfo = &one_w32_display_info; 4062 struct w32_display_info *dpyinfo = &one_w32_display_info;
4063 Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
4063 4064
4064 if (interrupt_input_blocked) 4065 if (interrupt_input_blocked)
4065 { 4066 {
4066 interrupt_input_pending = 1; 4067 interrupt_input_pending = 1;
4067 return -1; 4068 return -1;
4158 case WM_SYSKEYDOWN: 4159 case WM_SYSKEYDOWN:
4159 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 4160 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
4160 4161
4161 if (f && !f->iconified) 4162 if (f && !f->iconified)
4162 { 4163 {
4163 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 4164 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4164 && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) 4165 && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
4165 { 4166 {
4166 clear_mouse_face (dpyinfo); 4167 clear_mouse_face (hlinfo);
4167 dpyinfo->mouse_face_hidden = 1; 4168 hlinfo->mouse_face_hidden = 1;
4168 } 4169 }
4169 4170
4170 if (temp_index == sizeof temp_buffer / sizeof (short)) 4171 if (temp_index == sizeof temp_buffer / sizeof (short))
4171 temp_index = 0; 4172 temp_index = 0;
4172 temp_buffer[temp_index++] = msg.msg.wParam; 4173 temp_buffer[temp_index++] = msg.msg.wParam;
4183 case WM_CHAR: 4184 case WM_CHAR:
4184 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 4185 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
4185 4186
4186 if (f && !f->iconified) 4187 if (f && !f->iconified)
4187 { 4188 {
4188 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 4189 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4189 && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) 4190 && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
4190 { 4191 {
4191 clear_mouse_face (dpyinfo); 4192 clear_mouse_face (hlinfo);
4192 dpyinfo->mouse_face_hidden = 1; 4193 hlinfo->mouse_face_hidden = 1;
4193 } 4194 }
4194 4195
4195 if (temp_index == sizeof temp_buffer / sizeof (short)) 4196 if (temp_index == sizeof temp_buffer / sizeof (short))
4196 temp_index = 0; 4197 temp_index = 0;
4197 temp_buffer[temp_index++] = msg.msg.wParam; 4198 temp_buffer[temp_index++] = msg.msg.wParam;
4261 case WM_APPCOMMAND: 4262 case WM_APPCOMMAND:
4262 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 4263 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
4263 4264
4264 if (f && !f->iconified) 4265 if (f && !f->iconified)
4265 { 4266 {
4266 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 4267 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4267 && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) 4268 && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
4268 { 4269 {
4269 clear_mouse_face (dpyinfo); 4270 clear_mouse_face (hlinfo);
4270 dpyinfo->mouse_face_hidden = 1; 4271 hlinfo->mouse_face_hidden = 1;
4271 } 4272 }
4272 4273
4273 if (temp_index == sizeof temp_buffer / sizeof (short)) 4274 if (temp_index == sizeof temp_buffer / sizeof (short))
4274 temp_index = 0; 4275 temp_index = 0;
4275 temp_buffer[temp_index++] = msg.msg.wParam; 4276 temp_buffer[temp_index++] = msg.msg.wParam;
4299 && FRAME_LIVE_P (last_mouse_frame)) 4300 && FRAME_LIVE_P (last_mouse_frame))
4300 f = last_mouse_frame; 4301 f = last_mouse_frame;
4301 else 4302 else
4302 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 4303 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
4303 4304
4304 if (dpyinfo->mouse_face_hidden) 4305 if (hlinfo->mouse_face_hidden)
4305 { 4306 {
4306 dpyinfo->mouse_face_hidden = 0; 4307 hlinfo->mouse_face_hidden = 0;
4307 clear_mouse_face (dpyinfo); 4308 clear_mouse_face (hlinfo);
4308 } 4309 }
4309 4310
4310 if (f) 4311 if (f)
4311 { 4312 {
4312 /* Generate SELECT_WINDOW_EVENTs when needed. */ 4313 /* Generate SELECT_WINDOW_EVENTs when needed. */
4343 } 4344 }
4344 else 4345 else
4345 { 4346 {
4346 /* If we move outside the frame, then we're 4347 /* If we move outside the frame, then we're
4347 certainly no longer on any text in the frame. */ 4348 certainly no longer on any text in the frame. */
4348 clear_mouse_face (dpyinfo); 4349 clear_mouse_face (hlinfo);
4349 } 4350 }
4350 4351
4351 /* If the contents of the global variable help_echo_string 4352 /* If the contents of the global variable help_echo_string
4352 has changed, generate a HELP_EVENT. */ 4353 has changed, generate a HELP_EVENT. */
4353 #if 0 /* The below is an invalid comparison when USE_LISP_UNION_TYPE. 4354 #if 0 /* The below is an invalid comparison when USE_LISP_UNION_TYPE.
4632 4633
4633 case WM_MOUSELEAVE: 4634 case WM_MOUSELEAVE:
4634 f = x_any_window_to_frame (dpyinfo, msg.msg.hwnd); 4635 f = x_any_window_to_frame (dpyinfo, msg.msg.hwnd);
4635 if (f) 4636 if (f)
4636 { 4637 {
4637 if (f == dpyinfo->mouse_face_mouse_frame) 4638 if (f == hlinfo->mouse_face_mouse_frame)
4638 { 4639 {
4639 /* If we move outside the frame, then we're 4640 /* If we move outside the frame, then we're
4640 certainly no longer on any text in the frame. */ 4641 certainly no longer on any text in the frame. */
4641 clear_mouse_face (dpyinfo); 4642 clear_mouse_face (hlinfo);
4642 dpyinfo->mouse_face_mouse_frame = 0; 4643 hlinfo->mouse_face_mouse_frame = 0;
4643 } 4644 }
4644 4645
4645 /* Generate a nil HELP_EVENT to cancel a help-echo. 4646 /* Generate a nil HELP_EVENT to cancel a help-echo.
4646 Do it only if there's something to cancel. 4647 Do it only if there's something to cancel.
4647 Otherwise, the startup message is cleared when 4648 Otherwise, the startup message is cleared when
4667 dpyinfo->w32_focus_event_frame = 0; 4668 dpyinfo->w32_focus_event_frame = 0;
4668 4669
4669 if (f == dpyinfo->w32_focus_frame) 4670 if (f == dpyinfo->w32_focus_frame)
4670 x_new_focus_frame (dpyinfo, 0); 4671 x_new_focus_frame (dpyinfo, 0);
4671 4672
4672 if (f == dpyinfo->mouse_face_mouse_frame) 4673 if (f == hlinfo->mouse_face_mouse_frame)
4673 { 4674 {
4674 /* If we move outside the frame, then we're 4675 /* If we move outside the frame, then we're
4675 certainly no longer on any text in the frame. */ 4676 certainly no longer on any text in the frame. */
4676 clear_mouse_face (dpyinfo); 4677 clear_mouse_face (hlinfo);
4677 dpyinfo->mouse_face_mouse_frame = 0; 4678 hlinfo->mouse_face_mouse_frame = 0;
4678 } 4679 }
4679 4680
4680 /* Generate a nil HELP_EVENT to cancel a help-echo. 4681 /* Generate a nil HELP_EVENT to cancel a help-echo.
4681 Do it only if there's something to cancel. 4682 Do it only if there's something to cancel.
4682 Otherwise, the startup message is cleared when 4683 Otherwise, the startup message is cleared when
5820 5821
5821 void 5822 void
5822 x_free_frame_resources (struct frame *f) 5823 x_free_frame_resources (struct frame *f)
5823 { 5824 {
5824 struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); 5825 struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
5826 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
5825 5827
5826 BLOCK_INPUT; 5828 BLOCK_INPUT;
5827 5829
5828 /* We must free faces before destroying windows because some 5830 /* We must free faces before destroying windows because some
5829 font-driver (e.g. xft) access a window while finishing a 5831 font-driver (e.g. xft) access a window while finishing a
5858 if (f == dpyinfo->w32_focus_event_frame) 5860 if (f == dpyinfo->w32_focus_event_frame)
5859 dpyinfo->w32_focus_event_frame = 0; 5861 dpyinfo->w32_focus_event_frame = 0;
5860 if (f == dpyinfo->x_highlight_frame) 5862 if (f == dpyinfo->x_highlight_frame)
5861 dpyinfo->x_highlight_frame = 0; 5863 dpyinfo->x_highlight_frame = 0;
5862 5864
5863 if (f == dpyinfo->mouse_face_mouse_frame) 5865 if (f == hlinfo->mouse_face_mouse_frame)
5864 { 5866 {
5865 dpyinfo->mouse_face_beg_row 5867 hlinfo->mouse_face_beg_row
5866 = dpyinfo->mouse_face_beg_col = -1; 5868 = hlinfo->mouse_face_beg_col = -1;
5867 dpyinfo->mouse_face_end_row 5869 hlinfo->mouse_face_end_row
5868 = dpyinfo->mouse_face_end_col = -1; 5870 = hlinfo->mouse_face_end_col = -1;
5869 dpyinfo->mouse_face_window = Qnil; 5871 hlinfo->mouse_face_window = Qnil;
5870 dpyinfo->mouse_face_deferred_gc = 0; 5872 hlinfo->mouse_face_deferred_gc = 0;
5871 dpyinfo->mouse_face_mouse_frame = 0; 5873 hlinfo->mouse_face_mouse_frame = 0;
5872 } 5874 }
5873 5875
5874 UNBLOCK_INPUT; 5876 UNBLOCK_INPUT;
5875 } 5877 }
5876 5878
5932 5934
5933 void 5935 void
5934 w32_initialize_display_info (Lisp_Object display_name) 5936 w32_initialize_display_info (Lisp_Object display_name)
5935 { 5937 {
5936 struct w32_display_info *dpyinfo = &one_w32_display_info; 5938 struct w32_display_info *dpyinfo = &one_w32_display_info;
5939 Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
5937 5940
5938 memset (dpyinfo, 0, sizeof (*dpyinfo)); 5941 memset (dpyinfo, 0, sizeof (*dpyinfo));
5939 5942
5940 /* Put it on w32_display_name_list. */ 5943 /* Put it on w32_display_name_list. */
5941 w32_display_name_list = Fcons (Fcons (display_name, Qnil), 5944 w32_display_name_list = Fcons (Fcons (display_name, Qnil),
5957 dpyinfo->n_cbits = 4; 5960 dpyinfo->n_cbits = 4;
5958 dpyinfo->n_fonts = 0; 5961 dpyinfo->n_fonts = 0;
5959 dpyinfo->smallest_font_height = 1; 5962 dpyinfo->smallest_font_height = 1;
5960 dpyinfo->smallest_char_width = 1; 5963 dpyinfo->smallest_char_width = 1;
5961 5964
5962 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; 5965 hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
5963 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; 5966 hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
5964 dpyinfo->mouse_face_face_id = DEFAULT_FACE_ID; 5967 hlinfo->mouse_face_face_id = DEFAULT_FACE_ID;
5965 dpyinfo->mouse_face_window = Qnil; 5968 hlinfo->mouse_face_window = Qnil;
5966 dpyinfo->mouse_face_overlay = Qnil; 5969 hlinfo->mouse_face_overlay = Qnil;
5967 dpyinfo->mouse_face_hidden = 0; 5970 hlinfo->mouse_face_hidden = 0;
5968 5971
5969 dpyinfo->vertical_scroll_bar_cursor = w32_load_cursor (IDC_ARROW); 5972 dpyinfo->vertical_scroll_bar_cursor = w32_load_cursor (IDC_ARROW);
5970 /* TODO: dpyinfo->gray */ 5973 /* TODO: dpyinfo->gray */
5971 5974
5972 } 5975 }