diff options
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 236 |
1 files changed, 170 insertions, 66 deletions
diff --git a/src/w32term.c b/src/w32term.c index 1f53860de2e..7145efbc604 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | /* Implementation of GUI terminal on the Microsoft W32 API. | 1 | /* Implementation of GUI terminal on the Microsoft W32 API. |
| 2 | Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, | 2 | |
| 3 | 1999, 2000, 2001, 2002, 2003, 2004, 2005, | 3 | Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
| 4 | 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 4 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
| 5 | Free Software Foundation, Inc. | ||
| 5 | 6 | ||
| 6 | This file is part of GNU Emacs. | 7 | This file is part of GNU Emacs. |
| 7 | 8 | ||
| @@ -504,7 +505,7 @@ static void | |||
| 504 | x_update_window_begin (struct window *w) | 505 | x_update_window_begin (struct window *w) |
| 505 | { | 506 | { |
| 506 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 507 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 507 | struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); | 508 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); |
| 508 | 509 | ||
| 509 | /* Hide the system caret during an update. */ | 510 | /* Hide the system caret during an update. */ |
| 510 | if (w32_use_visible_system_caret && w32_system_caret_hwnd) | 511 | if (w32_use_visible_system_caret && w32_system_caret_hwnd) |
| @@ -517,15 +518,15 @@ x_update_window_begin (struct window *w) | |||
| 517 | 518 | ||
| 518 | BLOCK_INPUT; | 519 | BLOCK_INPUT; |
| 519 | 520 | ||
| 520 | if (f == display_info->mouse_face_mouse_frame) | 521 | if (f == hlinfo->mouse_face_mouse_frame) |
| 521 | { | 522 | { |
| 522 | /* Don't do highlighting for mouse motion during the update. */ | 523 | /* Don't do highlighting for mouse motion during the update. */ |
| 523 | display_info->mouse_face_defer = 1; | 524 | hlinfo->mouse_face_defer = 1; |
| 524 | 525 | ||
| 525 | /* 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 |
| 526 | highlighting. */ | 527 | highlighting. */ |
| 527 | if (FRAME_GARBAGED_P (f)) | 528 | if (FRAME_GARBAGED_P (f)) |
| 528 | display_info->mouse_face_window = Qnil; | 529 | hlinfo->mouse_face_window = Qnil; |
| 529 | 530 | ||
| 530 | #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 |
| 531 | 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 |
| @@ -539,8 +540,8 @@ x_update_window_begin (struct window *w) | |||
| 539 | Likewise, don't do anything if the frame is garbaged; | 540 | Likewise, don't do anything if the frame is garbaged; |
| 540 | 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 |
| 541 | is all wrong, and we will redisplay that line anyway. */ | 542 | is all wrong, and we will redisplay that line anyway. */ |
| 542 | if (!NILP (display_info->mouse_face_window) | 543 | if (!NILP (hlinfo->mouse_face_window) |
| 543 | && w == XWINDOW (display_info->mouse_face_window)) | 544 | && w == XWINDOW (hlinfo->mouse_face_window)) |
| 544 | { | 545 | { |
| 545 | int i; | 546 | int i; |
| 546 | 547 | ||
| @@ -549,7 +550,7 @@ x_update_window_begin (struct window *w) | |||
| 549 | break; | 550 | break; |
| 550 | 551 | ||
| 551 | if (i < w->desired_matrix->nrows) | 552 | if (i < w->desired_matrix->nrows) |
| 552 | clear_mouse_face (display_info); | 553 | clear_mouse_face (hlinfo); |
| 553 | } | 554 | } |
| 554 | #endif /* 0 */ | 555 | #endif /* 0 */ |
| 555 | } | 556 | } |
| @@ -600,7 +601,7 @@ static void | |||
| 600 | x_update_window_end (struct window *w, int cursor_on_p, | 601 | x_update_window_end (struct window *w, int cursor_on_p, |
| 601 | int mouse_face_overwritten_p) | 602 | int mouse_face_overwritten_p) |
| 602 | { | 603 | { |
| 603 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (XFRAME (w->frame)); | 604 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); |
| 604 | 605 | ||
| 605 | if (!w->pseudo_window_p) | 606 | if (!w->pseudo_window_p) |
| 606 | { | 607 | { |
| @@ -621,9 +622,9 @@ x_update_window_end (struct window *w, int cursor_on_p, | |||
| 621 | XTframe_up_to_date to redisplay the mouse highlight. */ | 622 | XTframe_up_to_date to redisplay the mouse highlight. */ |
| 622 | if (mouse_face_overwritten_p) | 623 | if (mouse_face_overwritten_p) |
| 623 | { | 624 | { |
| 624 | dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; | 625 | hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; |
| 625 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; | 626 | hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; |
| 626 | dpyinfo->mouse_face_window = Qnil; | 627 | hlinfo->mouse_face_window = Qnil; |
| 627 | } | 628 | } |
| 628 | 629 | ||
| 629 | /* 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 |
| @@ -648,7 +649,7 @@ x_update_end (struct frame *f) | |||
| 648 | return; | 649 | return; |
| 649 | 650 | ||
| 650 | /* Mouse highlight may be displayed again. */ | 651 | /* Mouse highlight may be displayed again. */ |
| 651 | FRAME_W32_DISPLAY_INFO (f)->mouse_face_defer = 0; | 652 | MOUSE_HL_INFO (f)->mouse_face_defer = 0; |
| 652 | } | 653 | } |
| 653 | 654 | ||
| 654 | 655 | ||
| @@ -661,17 +662,17 @@ w32_frame_up_to_date (struct frame *f) | |||
| 661 | { | 662 | { |
| 662 | if (FRAME_W32_P (f)) | 663 | if (FRAME_W32_P (f)) |
| 663 | { | 664 | { |
| 664 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); | 665 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); |
| 665 | 666 | ||
| 666 | if (dpyinfo->mouse_face_deferred_gc | 667 | if (hlinfo->mouse_face_deferred_gc |
| 667 | || f == dpyinfo->mouse_face_mouse_frame) | 668 | || f == hlinfo->mouse_face_mouse_frame) |
| 668 | { | 669 | { |
| 669 | BLOCK_INPUT; | 670 | BLOCK_INPUT; |
| 670 | if (dpyinfo->mouse_face_mouse_frame) | 671 | if (hlinfo->mouse_face_mouse_frame) |
| 671 | note_mouse_highlight (dpyinfo->mouse_face_mouse_frame, | 672 | note_mouse_highlight (hlinfo->mouse_face_mouse_frame, |
| 672 | dpyinfo->mouse_face_mouse_x, | 673 | hlinfo->mouse_face_mouse_x, |
| 673 | dpyinfo->mouse_face_mouse_y); | 674 | hlinfo->mouse_face_mouse_y); |
| 674 | dpyinfo->mouse_face_deferred_gc = 0; | 675 | hlinfo->mouse_face_deferred_gc = 0; |
| 675 | UNBLOCK_INPUT; | 676 | UNBLOCK_INPUT; |
| 676 | } | 677 | } |
| 677 | } | 678 | } |
| @@ -998,7 +999,7 @@ x_set_mouse_face_gc (struct glyph_string *s) | |||
| 998 | struct face *face; | 999 | struct face *face; |
| 999 | 1000 | ||
| 1000 | /* What face has to be used last for the mouse face? */ | 1001 | /* What face has to be used last for the mouse face? */ |
| 1001 | face_id = FRAME_W32_DISPLAY_INFO (s->f)->mouse_face_face_id; | 1002 | face_id = MOUSE_HL_INFO (s->f)->mouse_face_face_id; |
| 1002 | face = FACE_FROM_ID (s->f, face_id); | 1003 | face = FACE_FROM_ID (s->f, face_id); |
| 1003 | if (face == NULL) | 1004 | if (face == NULL) |
| 1004 | face = FACE_FROM_ID (s->f, MOUSE_FACE_ID); | 1005 | face = FACE_FROM_ID (s->f, MOUSE_FACE_ID); |
| @@ -1393,6 +1394,94 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s) | |||
| 1393 | } | 1394 | } |
| 1394 | 1395 | ||
| 1395 | 1396 | ||
| 1397 | /* Draw the foreground of glyph string S for glyphless characters. */ | ||
| 1398 | |||
| 1399 | static void | ||
| 1400 | x_draw_glyphless_glyph_string_foreground (struct glyph_string *s) | ||
| 1401 | { | ||
| 1402 | struct glyph *glyph = s->first_glyph; | ||
| 1403 | XChar2b char2b[8]; | ||
| 1404 | int x, i, j; | ||
| 1405 | int with_background; | ||
| 1406 | |||
| 1407 | /* If first glyph of S has a left box line, start drawing the text | ||
| 1408 | of S to the right of that box line. */ | ||
| 1409 | if (s->face->box != FACE_NO_BOX | ||
| 1410 | && s->first_glyph->left_box_line_p) | ||
| 1411 | x = s->x + eabs (s->face->box_line_width); | ||
| 1412 | else | ||
| 1413 | x = s->x; | ||
| 1414 | |||
| 1415 | SetTextColor (s->hdc, s->gc->foreground); | ||
| 1416 | SetBkColor (s->hdc, s->gc->background); | ||
| 1417 | SetTextAlign (s->hdc, TA_BASELINE | TA_LEFT); | ||
| 1418 | |||
| 1419 | s->char2b = char2b; | ||
| 1420 | with_background = ! (s->for_overlaps | ||
| 1421 | || (s->background_filled_p && s->hl != DRAW_CURSOR)); | ||
| 1422 | for (i = 0; i < s->nchars; i++, glyph++) | ||
| 1423 | { | ||
| 1424 | char buf[7], *str = NULL; | ||
| 1425 | int len = glyph->u.glyphless.len; | ||
| 1426 | |||
| 1427 | if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_ACRONYM) | ||
| 1428 | { | ||
| 1429 | if (len > 1 | ||
| 1430 | && CHAR_TABLE_P (Vglyphless_char_display) | ||
| 1431 | && (CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (Vglyphless_char_display)) | ||
| 1432 | >= 1)) | ||
| 1433 | { | ||
| 1434 | Lisp_Object acronym | ||
| 1435 | = (! glyph->u.glyphless.for_no_font | ||
| 1436 | ? CHAR_TABLE_REF (Vglyphless_char_display, | ||
| 1437 | glyph->u.glyphless.ch) | ||
| 1438 | : XCHAR_TABLE (Vglyphless_char_display)->extras[0]); | ||
| 1439 | if (STRINGP (acronym)) | ||
| 1440 | str = (char *) SDATA (acronym); | ||
| 1441 | } | ||
| 1442 | } | ||
| 1443 | else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE) | ||
| 1444 | { | ||
| 1445 | sprintf ((char *) buf, "%0*X", | ||
| 1446 | glyph->u.glyphless.ch < 0x10000 ? 4 : 6, | ||
| 1447 | glyph->u.glyphless.ch); | ||
| 1448 | str = buf; | ||
| 1449 | } | ||
| 1450 | |||
| 1451 | if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE) | ||
| 1452 | w32_draw_rectangle (s->hdc, s->gc, | ||
| 1453 | x, s->ybase - glyph->ascent, | ||
| 1454 | glyph->pixel_width - 1, | ||
| 1455 | glyph->ascent + glyph->descent - 1); | ||
| 1456 | if (str) | ||
| 1457 | { | ||
| 1458 | struct font *font = s->font; | ||
| 1459 | int upper_len = (len + 1) / 2; | ||
| 1460 | unsigned code; | ||
| 1461 | HFONT old_font; | ||
| 1462 | |||
| 1463 | old_font = SelectObject (s->hdc, FONT_HANDLE (font)); | ||
| 1464 | /* It is certain that all LEN characters in STR are ASCII. */ | ||
| 1465 | for (j = 0; j < len; j++) | ||
| 1466 | { | ||
| 1467 | code = font->driver->encode_char (font, str[j]); | ||
| 1468 | STORE_XCHAR2B (char2b + j, code >> 8, code & 0xFF); | ||
| 1469 | } | ||
| 1470 | font->driver->draw (s, 0, upper_len, | ||
| 1471 | x + glyph->slice.glyphless.upper_xoff, | ||
| 1472 | s->ybase + glyph->slice.glyphless.upper_yoff, | ||
| 1473 | with_background); | ||
| 1474 | font->driver->draw (s, upper_len, len, | ||
| 1475 | x + glyph->slice.glyphless.lower_xoff, | ||
| 1476 | s->ybase + glyph->slice.glyphless.lower_yoff, | ||
| 1477 | with_background); | ||
| 1478 | SelectObject (s->hdc, old_font); | ||
| 1479 | } | ||
| 1480 | x += glyph->pixel_width; | ||
| 1481 | } | ||
| 1482 | } | ||
| 1483 | |||
| 1484 | |||
| 1396 | /* Brightness beyond which a color won't have its highlight brightness | 1485 | /* Brightness beyond which a color won't have its highlight brightness |
| 1397 | boosted. | 1486 | boosted. |
| 1398 | 1487 | ||
| @@ -2281,6 +2370,14 @@ x_draw_glyph_string (struct glyph_string *s) | |||
| 2281 | x_draw_composite_glyph_string_foreground (s); | 2370 | x_draw_composite_glyph_string_foreground (s); |
| 2282 | break; | 2371 | break; |
| 2283 | 2372 | ||
| 2373 | case GLYPHLESS_GLYPH: | ||
| 2374 | if (s->for_overlaps) | ||
| 2375 | s->background_filled_p = 1; | ||
| 2376 | else | ||
| 2377 | x_draw_glyph_string_background (s, 0); | ||
| 2378 | x_draw_glyphless_glyph_string_foreground (s); | ||
| 2379 | break; | ||
| 2380 | |||
| 2284 | default: | 2381 | default: |
| 2285 | abort (); | 2382 | abort (); |
| 2286 | } | 2383 | } |
| @@ -3963,6 +4060,7 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 3963 | W32Msg msg; | 4060 | W32Msg msg; |
| 3964 | struct frame *f; | 4061 | struct frame *f; |
| 3965 | 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; | ||
| 3966 | 4064 | ||
| 3967 | if (interrupt_input_blocked) | 4065 | if (interrupt_input_blocked) |
| 3968 | { | 4066 | { |
| @@ -4063,11 +4161,11 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4063 | 4161 | ||
| 4064 | if (f && !f->iconified) | 4162 | if (f && !f->iconified) |
| 4065 | { | 4163 | { |
| 4066 | if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) | 4164 | if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) |
| 4067 | && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) | 4165 | && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)) |
| 4068 | { | 4166 | { |
| 4069 | clear_mouse_face (dpyinfo); | 4167 | clear_mouse_face (hlinfo); |
| 4070 | dpyinfo->mouse_face_hidden = 1; | 4168 | hlinfo->mouse_face_hidden = 1; |
| 4071 | } | 4169 | } |
| 4072 | 4170 | ||
| 4073 | if (temp_index == sizeof temp_buffer / sizeof (short)) | 4171 | if (temp_index == sizeof temp_buffer / sizeof (short)) |
| @@ -4088,11 +4186,11 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4088 | 4186 | ||
| 4089 | if (f && !f->iconified) | 4187 | if (f && !f->iconified) |
| 4090 | { | 4188 | { |
| 4091 | if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) | 4189 | if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) |
| 4092 | && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) | 4190 | && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)) |
| 4093 | { | 4191 | { |
| 4094 | clear_mouse_face (dpyinfo); | 4192 | clear_mouse_face (hlinfo); |
| 4095 | dpyinfo->mouse_face_hidden = 1; | 4193 | hlinfo->mouse_face_hidden = 1; |
| 4096 | } | 4194 | } |
| 4097 | 4195 | ||
| 4098 | if (temp_index == sizeof temp_buffer / sizeof (short)) | 4196 | if (temp_index == sizeof temp_buffer / sizeof (short)) |
| @@ -4166,11 +4264,11 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4166 | 4264 | ||
| 4167 | if (f && !f->iconified) | 4265 | if (f && !f->iconified) |
| 4168 | { | 4266 | { |
| 4169 | if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) | 4267 | if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) |
| 4170 | && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) | 4268 | && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)) |
| 4171 | { | 4269 | { |
| 4172 | clear_mouse_face (dpyinfo); | 4270 | clear_mouse_face (hlinfo); |
| 4173 | dpyinfo->mouse_face_hidden = 1; | 4271 | hlinfo->mouse_face_hidden = 1; |
| 4174 | } | 4272 | } |
| 4175 | 4273 | ||
| 4176 | if (temp_index == sizeof temp_buffer / sizeof (short)) | 4274 | if (temp_index == sizeof temp_buffer / sizeof (short)) |
| @@ -4204,10 +4302,10 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4204 | else | 4302 | else |
| 4205 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); | 4303 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); |
| 4206 | 4304 | ||
| 4207 | if (dpyinfo->mouse_face_hidden) | 4305 | if (hlinfo->mouse_face_hidden) |
| 4208 | { | 4306 | { |
| 4209 | dpyinfo->mouse_face_hidden = 0; | 4307 | hlinfo->mouse_face_hidden = 0; |
| 4210 | clear_mouse_face (dpyinfo); | 4308 | clear_mouse_face (hlinfo); |
| 4211 | } | 4309 | } |
| 4212 | 4310 | ||
| 4213 | if (f) | 4311 | if (f) |
| @@ -4219,7 +4317,7 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4219 | int x = LOWORD (msg.msg.lParam); | 4317 | int x = LOWORD (msg.msg.lParam); |
| 4220 | int y = HIWORD (msg.msg.lParam); | 4318 | int y = HIWORD (msg.msg.lParam); |
| 4221 | 4319 | ||
| 4222 | window = window_from_coordinates (f, x, y, 0, 0, 0, 0); | 4320 | window = window_from_coordinates (f, x, y, 0, 0); |
| 4223 | 4321 | ||
| 4224 | /* Window will be selected only when it is not | 4322 | /* Window will be selected only when it is not |
| 4225 | selected now and last mouse movement event was | 4323 | selected now and last mouse movement event was |
| @@ -4248,7 +4346,7 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4248 | { | 4346 | { |
| 4249 | /* If we move outside the frame, then we're | 4347 | /* If we move outside the frame, then we're |
| 4250 | certainly no longer on any text in the frame. */ | 4348 | certainly no longer on any text in the frame. */ |
| 4251 | clear_mouse_face (dpyinfo); | 4349 | clear_mouse_face (hlinfo); |
| 4252 | } | 4350 | } |
| 4253 | 4351 | ||
| 4254 | /* If the contents of the global variable help_echo_string | 4352 | /* If the contents of the global variable help_echo_string |
| @@ -4298,7 +4396,7 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4298 | int x = XFASTINT (inev.x); | 4396 | int x = XFASTINT (inev.x); |
| 4299 | int y = XFASTINT (inev.y); | 4397 | int y = XFASTINT (inev.y); |
| 4300 | 4398 | ||
| 4301 | window = window_from_coordinates (f, x, y, 0, 0, 0, 1); | 4399 | window = window_from_coordinates (f, x, y, 0, 1); |
| 4302 | 4400 | ||
| 4303 | if (EQ (window, f->tool_bar_window)) | 4401 | if (EQ (window, f->tool_bar_window)) |
| 4304 | { | 4402 | { |
| @@ -4537,12 +4635,12 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4537 | f = x_any_window_to_frame (dpyinfo, msg.msg.hwnd); | 4635 | f = x_any_window_to_frame (dpyinfo, msg.msg.hwnd); |
| 4538 | if (f) | 4636 | if (f) |
| 4539 | { | 4637 | { |
| 4540 | if (f == dpyinfo->mouse_face_mouse_frame) | 4638 | if (f == hlinfo->mouse_face_mouse_frame) |
| 4541 | { | 4639 | { |
| 4542 | /* If we move outside the frame, then we're | 4640 | /* If we move outside the frame, then we're |
| 4543 | certainly no longer on any text in the frame. */ | 4641 | certainly no longer on any text in the frame. */ |
| 4544 | clear_mouse_face (dpyinfo); | 4642 | clear_mouse_face (hlinfo); |
| 4545 | dpyinfo->mouse_face_mouse_frame = 0; | 4643 | hlinfo->mouse_face_mouse_frame = 0; |
| 4546 | } | 4644 | } |
| 4547 | 4645 | ||
| 4548 | /* Generate a nil HELP_EVENT to cancel a help-echo. | 4646 | /* Generate a nil HELP_EVENT to cancel a help-echo. |
| @@ -4572,12 +4670,12 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4572 | if (f == dpyinfo->w32_focus_frame) | 4670 | if (f == dpyinfo->w32_focus_frame) |
| 4573 | x_new_focus_frame (dpyinfo, 0); | 4671 | x_new_focus_frame (dpyinfo, 0); |
| 4574 | 4672 | ||
| 4575 | if (f == dpyinfo->mouse_face_mouse_frame) | 4673 | if (f == hlinfo->mouse_face_mouse_frame) |
| 4576 | { | 4674 | { |
| 4577 | /* If we move outside the frame, then we're | 4675 | /* If we move outside the frame, then we're |
| 4578 | certainly no longer on any text in the frame. */ | 4676 | certainly no longer on any text in the frame. */ |
| 4579 | clear_mouse_face (dpyinfo); | 4677 | clear_mouse_face (hlinfo); |
| 4580 | dpyinfo->mouse_face_mouse_frame = 0; | 4678 | hlinfo->mouse_face_mouse_frame = 0; |
| 4581 | } | 4679 | } |
| 4582 | 4680 | ||
| 4583 | /* Generate a nil HELP_EVENT to cancel a help-echo. | 4681 | /* Generate a nil HELP_EVENT to cancel a help-echo. |
| @@ -5725,6 +5823,7 @@ void | |||
| 5725 | x_free_frame_resources (struct frame *f) | 5823 | x_free_frame_resources (struct frame *f) |
| 5726 | { | 5824 | { |
| 5727 | 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); | ||
| 5728 | 5827 | ||
| 5729 | BLOCK_INPUT; | 5828 | BLOCK_INPUT; |
| 5730 | 5829 | ||
| @@ -5763,15 +5862,15 @@ x_free_frame_resources (struct frame *f) | |||
| 5763 | if (f == dpyinfo->x_highlight_frame) | 5862 | if (f == dpyinfo->x_highlight_frame) |
| 5764 | dpyinfo->x_highlight_frame = 0; | 5863 | dpyinfo->x_highlight_frame = 0; |
| 5765 | 5864 | ||
| 5766 | if (f == dpyinfo->mouse_face_mouse_frame) | 5865 | if (f == hlinfo->mouse_face_mouse_frame) |
| 5767 | { | 5866 | { |
| 5768 | dpyinfo->mouse_face_beg_row | 5867 | hlinfo->mouse_face_beg_row |
| 5769 | = dpyinfo->mouse_face_beg_col = -1; | 5868 | = hlinfo->mouse_face_beg_col = -1; |
| 5770 | dpyinfo->mouse_face_end_row | 5869 | hlinfo->mouse_face_end_row |
| 5771 | = dpyinfo->mouse_face_end_col = -1; | 5870 | = hlinfo->mouse_face_end_col = -1; |
| 5772 | dpyinfo->mouse_face_window = Qnil; | 5871 | hlinfo->mouse_face_window = Qnil; |
| 5773 | dpyinfo->mouse_face_deferred_gc = 0; | 5872 | hlinfo->mouse_face_deferred_gc = 0; |
| 5774 | dpyinfo->mouse_face_mouse_frame = 0; | 5873 | hlinfo->mouse_face_mouse_frame = 0; |
| 5775 | } | 5874 | } |
| 5776 | 5875 | ||
| 5777 | UNBLOCK_INPUT; | 5876 | UNBLOCK_INPUT; |
| @@ -5837,6 +5936,7 @@ void | |||
| 5837 | w32_initialize_display_info (Lisp_Object display_name) | 5936 | w32_initialize_display_info (Lisp_Object display_name) |
| 5838 | { | 5937 | { |
| 5839 | 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; | ||
| 5840 | 5940 | ||
| 5841 | memset (dpyinfo, 0, sizeof (*dpyinfo)); | 5941 | memset (dpyinfo, 0, sizeof (*dpyinfo)); |
| 5842 | 5942 | ||
| @@ -5862,12 +5962,12 @@ w32_initialize_display_info (Lisp_Object display_name) | |||
| 5862 | dpyinfo->smallest_font_height = 1; | 5962 | dpyinfo->smallest_font_height = 1; |
| 5863 | dpyinfo->smallest_char_width = 1; | 5963 | dpyinfo->smallest_char_width = 1; |
| 5864 | 5964 | ||
| 5865 | dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; | 5965 | hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; |
| 5866 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; | 5966 | hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; |
| 5867 | dpyinfo->mouse_face_face_id = DEFAULT_FACE_ID; | 5967 | hlinfo->mouse_face_face_id = DEFAULT_FACE_ID; |
| 5868 | dpyinfo->mouse_face_window = Qnil; | 5968 | hlinfo->mouse_face_window = Qnil; |
| 5869 | dpyinfo->mouse_face_overlay = Qnil; | 5969 | hlinfo->mouse_face_overlay = Qnil; |
| 5870 | dpyinfo->mouse_face_hidden = 0; | 5970 | hlinfo->mouse_face_hidden = 0; |
| 5871 | 5971 | ||
| 5872 | dpyinfo->vertical_scroll_bar_cursor = w32_load_cursor (IDC_ARROW); | 5972 | dpyinfo->vertical_scroll_bar_cursor = w32_load_cursor (IDC_ARROW); |
| 5873 | /* TODO: dpyinfo->gray */ | 5973 | /* TODO: dpyinfo->gray */ |
| @@ -6336,7 +6436,9 @@ the cursor have no effect. */); | |||
| 6336 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. | 6436 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. |
| 6337 | A value of nil means ignore them. If you encounter fonts with bogus | 6437 | A value of nil means ignore them. If you encounter fonts with bogus |
| 6338 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | 6438 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior |
| 6339 | to 4.1, set this to nil. */); | 6439 | to 4.1, set this to nil. You can also use `underline-minimum-offset' |
| 6440 | to override the font's UNDERLINE_POSITION for small font display | ||
| 6441 | sizes. */); | ||
| 6340 | x_use_underline_position_properties = 0; | 6442 | x_use_underline_position_properties = 0; |
| 6341 | 6443 | ||
| 6342 | DEFVAR_BOOL ("x-underline-at-descent-line", | 6444 | DEFVAR_BOOL ("x-underline-at-descent-line", |
| @@ -6348,12 +6450,14 @@ baseline level. The default value is nil. */); | |||
| 6348 | x_underline_at_descent_line = 0; | 6450 | x_underline_at_descent_line = 0; |
| 6349 | 6451 | ||
| 6350 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | 6452 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, |
| 6351 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); | 6453 | doc: /* Which toolkit scroll bars Emacs uses, if any. |
| 6454 | A value of nil means Emacs doesn't use toolkit scroll bars. | ||
| 6455 | With the X Window system, the value is a symbol describing the | ||
| 6456 | X toolkit. Possible values are: gtk, motif, xaw, or xaw3d. | ||
| 6457 | With MS Windows, the value is t. */); | ||
| 6352 | Vx_toolkit_scroll_bars = Qt; | 6458 | Vx_toolkit_scroll_bars = Qt; |
| 6353 | 6459 | ||
| 6354 | staticpro (&last_mouse_motion_frame); | 6460 | staticpro (&last_mouse_motion_frame); |
| 6355 | last_mouse_motion_frame = Qnil; | 6461 | last_mouse_motion_frame = Qnil; |
| 6356 | } | 6462 | } |
| 6357 | 6463 | ||
| 6358 | /* arch-tag: 5fa70624-ab86-499c-8a85-473958ee4646 | ||
| 6359 | (do not change this comment) */ | ||