comparison src/w32term.c @ 30240:2c2a7ebd2c15

(help_echo_object, help_echo_pos): New variables. (note_mode_line_highlight): Store additional information about the help-echo in help_echo_object and help_echo_pos. Check both `local-map' and `keymap' properties for changing the cursor (note_mouse_highlight): Store additional information about the help-echo in help_echo_object and help_echo_pos. (note_tool_bar_highlight): Set help_echo_object to nil and help_echo_pos to -1. (w32_read_socket): Use gen_help_event instead of filling input_events manually. (syms_of_w32term): Staticpro help_echo_object. (x_update_window_end): Add parameter MOUSE_FACE_OVERWRITTEN_P. If set, arrange for a mouse-highlight redisplay in XTframe_up_to_date. (x_clear_mouse_face): New function. (w32_redisplay_interface): Add pointer to x_clear_mouse_face. (x_update_window_begin): No need to turn off the mouse highlight here. (show_mouse_face): Set the mouse_face_p flag of glyph rows depending on whether they contain glyphs highlighted in mouse-face. (x_fill_stretch_glyph_string): Consume runs of stretch glyphs instead of a single one. (BUILD_STRETCH_GLYPH_STRING): Call x_fill_stretch_glyph_string with new argument list. (x_set_glyph_string_gc): Make sure the face's GC is valid. (x_append_glyph, x_append_composite_glyph) (x_produce_image_glyph, x_append_stretch_glyph): Accomodate to changes in struct glyph starting 1999-12-27. See comments for xterm.c on 2000-07-05.
author Jason Rumney <jasonr@gnu.org>
date Sat, 15 Jul 2000 12:00:51 +0000
parents 298f10cd4ba5
children 460a4e222f17
comparison
equal deleted inserted replaced
30239:6a55bd8a85f8 30240:2c2a7ebd2c15
159 159
160 /* If a string, w32_read_socket generates an event to display that string. 160 /* If a string, w32_read_socket generates an event to display that string.
161 (The display is done in read_char.) */ 161 (The display is done in read_char.) */
162 162
163 static Lisp_Object help_echo; 163 static Lisp_Object help_echo;
164 static Lisp_Object help_echo_object;
165 static int help_echo_pos;
164 166
165 /* Temporary variable for w32_read_socket. */ 167 /* Temporary variable for w32_read_socket. */
166 168
167 static Lisp_Object previous_help_echo; 169 static Lisp_Object previous_help_echo;
168 170
591 /* If F needs to be redrawn, simply forget about any prior mouse 593 /* If F needs to be redrawn, simply forget about any prior mouse
592 highlighting. */ 594 highlighting. */
593 if (FRAME_GARBAGED_P (f)) 595 if (FRAME_GARBAGED_P (f))
594 display_info->mouse_face_window = Qnil; 596 display_info->mouse_face_window = Qnil;
595 597
598 #if 0 /* Rows in a current matrix containing glyphs in mouse-face have
599 their mouse_face_p flag set, which means that they are always
600 unequal to rows in a desired matrix which never have that
601 flag set. So, rows containing mouse-face glyphs are never
602 scrolled, and we don't have to switch the mouse highlight off
603 here to prevent it from being scrolled. */
604
596 /* Can we tell that this update does not affect the window 605 /* Can we tell that this update does not affect the window
597 where the mouse highlight is? If so, no need to turn off. 606 where the mouse highlight is? If so, no need to turn off.
598 Likewise, don't do anything if the frame is garbaged; 607 Likewise, don't do anything if the frame is garbaged;
599 in that case, the frame's current matrix that we would use 608 in that case, the frame's current matrix that we would use
600 is all wrong, and we will redisplay that line anyway. */ 609 is all wrong, and we will redisplay that line anyway. */
608 break; 617 break;
609 618
610 if (i < w->desired_matrix->nrows) 619 if (i < w->desired_matrix->nrows)
611 clear_mouse_face (display_info); 620 clear_mouse_face (display_info);
612 } 621 }
622 #endif /* 0 */
613 } 623 }
614 624
615 UNBLOCK_INPUT; 625 UNBLOCK_INPUT;
616 } 626 }
617 627
645 release_frame_dc (f, hdc); 655 release_frame_dc (f, hdc);
646 } 656 }
647 } 657 }
648 658
649 659
650 /* End update of window W (which is equal to updated_window). Draw 660 /* End update of window W (which is equal to updated_window).
651 vertical borders between horizontally adjacent windows, and display 661
652 W's cursor if CURSOR_ON_P is non-zero. W may be a menu bar 662 Draw vertical borders between horizontally adjacent windows, and
653 pseudo-window in case we don't have X toolkit support. Such 663 display W's cursor if CURSOR_ON_P is non-zero.
654 windows don't have a cursor, so don't display it here. */ 664
665 MOUSE_FACE_OVERWRITTEN_P non-zero means that some row containing
666 glyphs in mouse-face were overwritten. In that case we have to
667 make sure that the mouse-highlight is properly redrawn.
668
669 W may be a menu bar pseudo-window in case we don't have X toolkit
670 support. Such windows don't have a cursor, so don't display it
671 here. */
655 672
656 static void 673 static void
657 x_update_window_end (w, cursor_on_p) 674 x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
658 struct window *w; 675 struct window *w;
659 int cursor_on_p; 676 int cursor_on_p, mouse_face_overwritten_p;
660 { 677 {
661 if (!w->pseudo_window_p) 678 if (!w->pseudo_window_p)
662 { 679 {
680 struct w32_display_info *dpyinfo
681 = FRAME_W32_DISPLAY_INFO (XFRAME (w->frame));
682
663 BLOCK_INPUT; 683 BLOCK_INPUT;
684
685 /* If a row with mouse-face was overwritten, arrange for
686 XTframe_up_to_date to redisplay the mouse highlight. */
687 if (mouse_face_overwritten_p)
688 {
689 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
690 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
691 dpyinfo->mouse_face_window = Qnil;
692 }
693
664 if (cursor_on_p) 694 if (cursor_on_p)
665 x_display_and_set_cursor (w, 1, output_cursor.hpos, 695 x_display_and_set_cursor (w, 1, output_cursor.hpos,
666 output_cursor.vpos, 696 output_cursor.vpos,
667 output_cursor.x, output_cursor.y); 697 output_cursor.x, output_cursor.y);
668 x_draw_vertical_border (w); 698 x_draw_vertical_border (w);
1426 xassert (it->char_to_display != '\n' && it->char_to_display != '\t'); 1456 xassert (it->char_to_display != '\n' && it->char_to_display != '\t');
1427 1457
1428 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; 1458 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
1429 if (glyph < it->glyph_row->glyphs[area + 1]) 1459 if (glyph < it->glyph_row->glyphs[area + 1])
1430 { 1460 {
1431 /* Play it safe. If sub-structures of the glyph are not all the
1432 same size, it otherwise be that some bits stay set. This
1433 would prevent a comparison with GLYPH_EQUAL_P. */
1434 glyph->u.val = 0;
1435
1436 glyph->type = CHAR_GLYPH;
1437 glyph->pixel_width = it->pixel_width;
1438 glyph->u.ch = it->char_to_display;
1439 glyph->face_id = it->face_id;
1440 glyph->charpos = CHARPOS (it->position); 1461 glyph->charpos = CHARPOS (it->position);
1441 glyph->object = it->object; 1462 glyph->object = it->object;
1463 glyph->pixel_width = it->pixel_width;
1464 glyph->voffset = it->voffset;
1465 glyph->type = CHAR_GLYPH;
1466 glyph->multibyte_p = it->multibyte_p;
1442 glyph->left_box_line_p = it->start_of_box_run_p; 1467 glyph->left_box_line_p = it->start_of_box_run_p;
1443 glyph->right_box_line_p = it->end_of_box_run_p; 1468 glyph->right_box_line_p = it->end_of_box_run_p;
1444 glyph->voffset = it->voffset;
1445 glyph->multibyte_p = it->multibyte_p;
1446 glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent 1469 glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent
1447 || it->phys_descent > it->descent); 1470 || it->phys_descent > it->descent);
1471 glyph->padding_p = 0;
1448 glyph->glyph_not_available_p = it->glyph_not_available_p; 1472 glyph->glyph_not_available_p = it->glyph_not_available_p;
1473 glyph->face_id = it->face_id;
1474 glyph->u.ch = it->char_to_display;
1475 glyph->w32_font_type = UNKNOWN_FONT;
1449 ++it->glyph_row->used[area]; 1476 ++it->glyph_row->used[area];
1450 } 1477 }
1451 } 1478 }
1452 1479
1453 /* Store one glyph for the composition IT->cmp_id in IT->glyph_row. 1480 /* Store one glyph for the composition IT->cmp_id in IT->glyph_row.
1463 xassert (it->glyph_row); 1490 xassert (it->glyph_row);
1464 1491
1465 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; 1492 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
1466 if (glyph < it->glyph_row->glyphs[area + 1]) 1493 if (glyph < it->glyph_row->glyphs[area + 1])
1467 { 1494 {
1468 /* Play it safe. If sub-structures of the glyph are not all the
1469 same size, it otherwise be that some bits stay set. This
1470 would prevent a comparison with GLYPH_EQUAL_P. */
1471 glyph->u.val = 0;
1472
1473 glyph->type = COMPOSITE_GLYPH;
1474 glyph->pixel_width = it->pixel_width;
1475 glyph->u.cmp_id = it->cmp_id;
1476 glyph->face_id = it->face_id;
1477 glyph->charpos = CHARPOS (it->position); 1495 glyph->charpos = CHARPOS (it->position);
1478 glyph->object = it->object; 1496 glyph->object = it->object;
1497 glyph->pixel_width = it->pixel_width;
1498 glyph->voffset = it->voffset;
1499 glyph->type = COMPOSITE_GLYPH;
1500 glyph->multibyte_p = it->multibyte_p;
1479 glyph->left_box_line_p = it->start_of_box_run_p; 1501 glyph->left_box_line_p = it->start_of_box_run_p;
1480 glyph->right_box_line_p = it->end_of_box_run_p; 1502 glyph->right_box_line_p = it->end_of_box_run_p;
1481 glyph->voffset = it->voffset;
1482 glyph->multibyte_p = it->multibyte_p;
1483 glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent 1503 glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent
1484 || it->phys_descent > it->descent); 1504 || it->phys_descent > it->descent);
1505 glyph->padding_p = 0;
1506 glyph->glyph_not_available_p = 0;
1507 glyph->face_id = it->face_id;
1508 glyph->u.cmp_id = it->cmp_id;
1509 glyph->w32_font_type = UNKNOWN_FONT;
1485 ++it->glyph_row->used[area]; 1510 ++it->glyph_row->used[area];
1486 } 1511 }
1487 } 1512 }
1488 1513
1489 1514
1554 enum glyph_row_area area = it->area; 1579 enum glyph_row_area area = it->area;
1555 1580
1556 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; 1581 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
1557 if (glyph < it->glyph_row->glyphs[area + 1]) 1582 if (glyph < it->glyph_row->glyphs[area + 1])
1558 { 1583 {
1559 glyph->type = IMAGE_GLYPH;
1560 glyph->u.img_id = img->id;
1561 glyph->face_id = it->face_id;
1562 glyph->pixel_width = it->pixel_width;
1563 glyph->charpos = CHARPOS (it->position); 1584 glyph->charpos = CHARPOS (it->position);
1564 glyph->object = it->object; 1585 glyph->object = it->object;
1586 glyph->pixel_width = it->pixel_width;
1587 glyph->voffset = it->voffset;
1588 glyph->type = IMAGE_GLYPH;
1589 glyph->multibyte_p = it->multibyte_p;
1565 glyph->left_box_line_p = it->start_of_box_run_p; 1590 glyph->left_box_line_p = it->start_of_box_run_p;
1566 glyph->right_box_line_p = it->end_of_box_run_p; 1591 glyph->right_box_line_p = it->end_of_box_run_p;
1567 glyph->voffset = it->voffset; 1592 glyph->overlaps_vertically_p = 0;
1568 glyph->multibyte_p = it->multibyte_p; 1593 glyph->padding_p = 0;
1594 glyph->glyph_not_available_p = 0;
1595 glyph->face_id = it->face_id;
1596 glyph->u.img_id = img->id;
1597 glyph->w32_font_type = UNKNOWN_FONT;
1569 ++it->glyph_row->used[area]; 1598 ++it->glyph_row->used[area];
1570 } 1599 }
1571 } 1600 }
1572 } 1601 }
1573 1602
1590 xassert (ascent >= 0 && ascent <= 1); 1619 xassert (ascent >= 0 && ascent <= 1);
1591 1620
1592 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; 1621 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
1593 if (glyph < it->glyph_row->glyphs[area + 1]) 1622 if (glyph < it->glyph_row->glyphs[area + 1])
1594 { 1623 {
1624 glyph->charpos = CHARPOS (it->position);
1625 glyph->object = object;
1626 glyph->pixel_width = width;
1627 glyph->voffset = it->voffset;
1595 glyph->type = STRETCH_GLYPH; 1628 glyph->type = STRETCH_GLYPH;
1629 glyph->multibyte_p = it->multibyte_p;
1630 glyph->left_box_line_p = it->start_of_box_run_p;
1631 glyph->right_box_line_p = it->end_of_box_run_p;
1632 glyph->overlaps_vertically_p = 0;
1633 glyph->padding_p = 0;
1634 glyph->glyph_not_available_p = 0;
1635 glyph->face_id = it->face_id;
1596 glyph->u.stretch.ascent = height * ascent; 1636 glyph->u.stretch.ascent = height * ascent;
1597 glyph->u.stretch.height = height; 1637 glyph->u.stretch.height = height;
1598 glyph->face_id = it->face_id; 1638 glyph->w32_font_type = UNKNOWN_FONT;
1599 glyph->pixel_width = width;
1600 glyph->charpos = CHARPOS (it->position);
1601 glyph->object = object;
1602 glyph->left_box_line_p = it->start_of_box_run_p;
1603 glyph->right_box_line_p = it->end_of_box_run_p;
1604 glyph->voffset = it->voffset;
1605 glyph->multibyte_p = it->multibyte_p;
1606 ++it->glyph_row->used[area]; 1639 ++it->glyph_row->used[area];
1607 } 1640 }
1608 } 1641 }
1609 1642
1610 1643
2472 static INLINE void 2505 static INLINE void
2473 x_set_mode_line_face_gc (s) 2506 x_set_mode_line_face_gc (s)
2474 struct glyph_string *s; 2507 struct glyph_string *s;
2475 { 2508 {
2476 s->gc = s->face->gc; 2509 s->gc = s->face->gc;
2477 xassert (s->gc != 0);
2478 } 2510 }
2479 2511
2480 2512
2481 /* Set S->gc of glyph string S for drawing that glyph string. Set 2513 /* Set S->gc of glyph string S for drawing that glyph string. Set
2482 S->stippled_p to a non-zero value if the face of S has a stipple 2514 S->stippled_p to a non-zero value if the face of S has a stipple
2484 2516
2485 static INLINE void 2517 static INLINE void
2486 x_set_glyph_string_gc (s) 2518 x_set_glyph_string_gc (s)
2487 struct glyph_string *s; 2519 struct glyph_string *s;
2488 { 2520 {
2521 PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
2522
2489 if (s->hl == DRAW_NORMAL_TEXT) 2523 if (s->hl == DRAW_NORMAL_TEXT)
2490 { 2524 {
2491 s->gc = s->face->gc; 2525 s->gc = s->face->gc;
2492 s->stippled_p = s->face->stipple != 0; 2526 s->stippled_p = s->face->stipple != 0;
2493 } 2527 }
3994 /* Adjust base line for subscript/superscript text. */ 4028 /* Adjust base line for subscript/superscript text. */
3995 s->ybase += s->first_glyph->voffset; 4029 s->ybase += s->first_glyph->voffset;
3996 } 4030 }
3997 4031
3998 4032
3999 /* Fill glyph string S from stretch glyph S->first_glyph. */ 4033 /* Fill glyph string S from a sequence of stretch glyphs.
4000 4034
4001 static void 4035 ROW is the glyph row in which the glyphs are found, AREA is the
4002 x_fill_stretch_glyph_string (s) 4036 area within the row. START is the index of the first glyph to
4037 consider, END is the index of the last + 1.
4038
4039 Value is the index of the first glyph not in S. */
4040
4041 static int
4042 x_fill_stretch_glyph_string (s, row, area, start, end)
4003 struct glyph_string *s; 4043 struct glyph_string *s;
4004 { 4044 struct glyph_row *row;
4045 enum glyph_row_area area;
4046 int start, end;
4047 {
4048 struct glyph *glyph, *last;
4049 int voffset, face_id;
4050
4005 xassert (s->first_glyph->type == STRETCH_GLYPH); 4051 xassert (s->first_glyph->type == STRETCH_GLYPH);
4006 s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id); 4052
4053 glyph = s->row->glyphs[s->area] + start;
4054 last = s->row->glyphs[s->area] + end;
4055 face_id = glyph->face_id;
4056 s->face = FACE_FROM_ID (s->f, face_id);
4007 s->font = s->face->font; 4057 s->font = s->face->font;
4008 s->width = s->first_glyph->pixel_width; 4058 s->font_info = FONT_INFO_FROM_ID (s->f, s->face->font_info_id);
4059 s->width = glyph->pixel_width;
4060 voffset = glyph->voffset;
4061
4062 for (++glyph;
4063 (glyph < last
4064 && glyph->type == STRETCH_GLYPH
4065 && glyph->voffset == voffset
4066 && glyph->face_id == face_id);
4067 ++glyph)
4068 s->width += glyph->pixel_width;
4009 4069
4010 /* Adjust base line for subscript/superscript text. */ 4070 /* Adjust base line for subscript/superscript text. */
4011 s->ybase += s->first_glyph->voffset; 4071 s->ybase += voffset;
4072
4073 xassert (s->face && s->face->gc);
4074 return glyph - s->row->glyphs[s->area];
4012 } 4075 }
4013 4076
4014 4077
4015 /* Initialize glyph string S. CHAR2B is a suitably allocated vector 4078 /* Initialize glyph string S. CHAR2B is a suitably allocated vector
4016 of XChar2b structures for S; it can't be allocated in 4079 of XChar2b structures for S; it can't be allocated in
4094 #define BUILD_STRETCH_GLYPH_STRING(hdc, W, ROW, AREA, START, END, HEAD, TAIL, HL, X, LAST_X) \ 4157 #define BUILD_STRETCH_GLYPH_STRING(hdc, W, ROW, AREA, START, END, HEAD, TAIL, HL, X, LAST_X) \
4095 do \ 4158 do \
4096 { \ 4159 { \
4097 s = (struct glyph_string *) alloca (sizeof *s); \ 4160 s = (struct glyph_string *) alloca (sizeof *s); \
4098 w32_init_glyph_string (s, hdc, NULL, W, ROW, AREA, START, HL); \ 4161 w32_init_glyph_string (s, hdc, NULL, W, ROW, AREA, START, HL); \
4099 x_fill_stretch_glyph_string (s); \ 4162 START = x_fill_stretch_glyph_string (s, ROW, AREA, START, END); \
4100 x_append_glyph_string (&HEAD, &TAIL, s); \ 4163 x_append_glyph_string (&HEAD, &TAIL, s); \
4101 ++START; \
4102 s->x = (X); \ 4164 s->x = (X); \
4103 } \ 4165 } \
4104 while (0) 4166 while (0)
4105 4167
4106 4168
4135 right-most x-position of the drawing area. */ 4197 right-most x-position of the drawing area. */
4136 4198
4137 #define BUILD_CHAR_GLYPH_STRINGS(hdc, W, ROW, AREA, START, END, HEAD, TAIL, HL, X, LAST_X, OVERLAPS_P) \ 4199 #define BUILD_CHAR_GLYPH_STRINGS(hdc, W, ROW, AREA, START, END, HEAD, TAIL, HL, X, LAST_X, OVERLAPS_P) \
4138 do \ 4200 do \
4139 { \ 4201 { \
4140 int c, charset, face_id; \ 4202 int c, face_id; \
4141 wchar_t *char2b; \ 4203 wchar_t *char2b; \
4142 \ 4204 \
4143 c = (ROW)->glyphs[AREA][START].u.ch; \ 4205 c = (ROW)->glyphs[AREA][START].u.ch; \
4144 face_id = (ROW)->glyphs[AREA][START].face_id; \ 4206 face_id = (ROW)->glyphs[AREA][START].face_id; \
4145 \ 4207 \
4313 4375
4314 /* Translate X to frame coordinates. Set last_x to the right 4376 /* Translate X to frame coordinates. Set last_x to the right
4315 end of the drawing area. */ 4377 end of the drawing area. */
4316 if (row->full_width_p) 4378 if (row->full_width_p)
4317 { 4379 {
4318 struct frame *f = XFRAME (WINDOW_FRAME (w));
4319
4320 /* X is relative to the left edge of W, without scroll bars 4380 /* X is relative to the left edge of W, without scroll bars
4321 or flag areas. */ 4381 or flag areas. */
4382 struct frame *f = XFRAME (WINDOW_FRAME (w));
4322 /* int width = FRAME_FLAGS_AREA_WIDTH (f); */ 4383 /* int width = FRAME_FLAGS_AREA_WIDTH (f); */
4323 int window_left_x = WINDOW_LEFT_MARGIN (w) * CANON_X_UNIT (f); 4384 int window_left_x = WINDOW_LEFT_MARGIN (w) * CANON_X_UNIT (f);
4324 4385
4325 x += window_left_x; 4386 x += window_left_x;
4326 area_width = XFASTINT (w->width) * CANON_X_UNIT (f); 4387 area_width = XFASTINT (w->width) * CANON_X_UNIT (f);
5350 } 5411 }
5351 5412
5352 /* Arrange for the division in PIXEL_TO_CHAR_COL etc. to round down 5413 /* Arrange for the division in PIXEL_TO_CHAR_COL etc. to round down
5353 even for negative values. */ 5414 even for negative values. */
5354 if (pix_x < 0) 5415 if (pix_x < 0)
5355 pix_x -= FONT_WIDTH ((f)->output_data.w32->font) - 1; 5416 pix_x -= FONT_WIDTH (FRAME_FONT(f)) - 1;
5356 if (pix_y < 0) 5417 if (pix_y < 0)
5357 pix_y -= (f)->output_data.w32->line_height - 1; 5418 pix_y -= (f)->output_data.w32->line_height - 1;
5358 5419
5359 pix_x = PIXEL_TO_CHAR_COL (f, pix_x); 5420 pix_x = PIXEL_TO_CHAR_COL (f, pix_x);
5360 pix_y = PIXEL_TO_CHAR_ROW (f, pix_y); 5421 pix_y = PIXEL_TO_CHAR_ROW (f, pix_y);
5361 5422
5362 if (bounds) 5423 if (bounds)
5363 { 5424 {
5364 bounds->left = CHAR_TO_PIXEL_COL (f, pix_x); 5425 bounds->left = CHAR_TO_PIXEL_COL (f, pix_x);
5365 bounds->top = CHAR_TO_PIXEL_ROW (f, pix_y); 5426 bounds->top = CHAR_TO_PIXEL_ROW (f, pix_y);
5366 bounds->right = bounds->left + FONT_WIDTH (f->output_data.w32->font) - 1; 5427 bounds->right = bounds->left + FONT_WIDTH (FRAME_FONT(f)) - 1;
5367 bounds->bottom = bounds->top + f->output_data.w32->line_height - 1; 5428 bounds->bottom = bounds->top + f->output_data.w32->line_height - 1;
5368 } 5429 }
5369 5430
5370 if (!noclip) 5431 if (!noclip)
5371 { 5432 {
5372 if (pix_x < 0) 5433 if (pix_x < 0)
5373 pix_x = 0; 5434 pix_x = 0;
5374 else if (pix_x > f->width) 5435 else if (pix_x > FRAME_WINDOW_WIDTH (f))
5375 pix_x = f->width; 5436 pix_x = FRAME_WINDOW_WIDTH (f);
5376 5437
5377 if (pix_y < 0) 5438 if (pix_y < 0)
5378 pix_y = 0; 5439 pix_y = 0;
5379 else if (pix_y > f->height) 5440 else if (pix_y > f->height)
5380 pix_y = f->height; 5441 pix_y = f->height;
5489 /* Prepare a mouse-event in *RESULT for placement in the input queue. 5550 /* Prepare a mouse-event in *RESULT for placement in the input queue.
5490 5551
5491 If the event is a button press, then note that we have grabbed 5552 If the event is a button press, then note that we have grabbed
5492 the mouse. */ 5553 the mouse. */
5493 5554
5494 static void 5555 static Lisp_Object
5495 construct_mouse_click (result, msg, f) 5556 construct_mouse_click (result, msg, f)
5496 struct input_event *result; 5557 struct input_event *result;
5497 W32Msg *msg; 5558 W32Msg *msg;
5498 struct frame *f; 5559 struct frame *f;
5499 { 5560 {
5510 result->modifiers = (msg->dwModifiers 5571 result->modifiers = (msg->dwModifiers
5511 | (up 5572 | (up
5512 ? up_modifier 5573 ? up_modifier
5513 : down_modifier)); 5574 : down_modifier));
5514 5575
5515 { 5576 XSETINT (result->x, LOWORD (msg->msg.lParam));
5516 int row, column; 5577 XSETINT (result->y, HIWORD (msg->msg.lParam));
5517 5578 XSETFRAME (result->frame_or_window, f);
5518 XSETINT (result->x, LOWORD (msg->msg.lParam)); 5579 result->arg = Qnil;
5519 XSETINT (result->y, HIWORD (msg->msg.lParam)); 5580 return Qnil;
5520 XSETFRAME (result->frame_or_window, f); 5581 }
5521 result->arg = Qnil; 5582
5522 } 5583 static Lisp_Object
5523 }
5524
5525 static void
5526 construct_mouse_wheel (result, msg, f) 5584 construct_mouse_wheel (result, msg, f)
5527 struct input_event *result; 5585 struct input_event *result;
5528 W32Msg *msg; 5586 W32Msg *msg;
5529 struct frame *f; 5587 struct frame *f;
5530 { 5588 {
5538 ScreenToClient(msg->msg.hwnd, &p); 5596 ScreenToClient(msg->msg.hwnd, &p);
5539 XSETINT (result->x, p.x); 5597 XSETINT (result->x, p.x);
5540 XSETINT (result->y, p.y); 5598 XSETINT (result->y, p.y);
5541 XSETFRAME (result->frame_or_window, f); 5599 XSETFRAME (result->frame_or_window, f);
5542 result->arg = Qnil; 5600 result->arg = Qnil;
5543 } 5601 return Qnil;
5544 5602 }
5545 static void 5603
5604 static Lisp_Object
5546 construct_drag_n_drop (result, msg, f) 5605 construct_drag_n_drop (result, msg, f)
5547 struct input_event *result; 5606 struct input_event *result;
5548 W32Msg *msg; 5607 W32Msg *msg;
5549 struct frame *f; 5608 struct frame *f;
5550 { 5609 {
5589 DragFinish (hdrop); 5648 DragFinish (hdrop);
5590 5649
5591 XSETFRAME (frame, f); 5650 XSETFRAME (frame, f);
5592 result->frame_or_window = Fcons (frame, files); 5651 result->frame_or_window = Fcons (frame, files);
5593 result->arg = Qnil; 5652 result->arg = Qnil;
5653 return Qnil;
5594 } 5654 }
5595 5655
5596 5656
5597 /* Function to report a mouse movement to the mainstream Emacs code. 5657 /* Function to report a mouse movement to the mainstream Emacs code.
5598 The input handler calls this. 5658 The input handler calls this.
5657 struct window *w; 5717 struct window *w;
5658 int x, y; 5718 int x, y;
5659 int *hpos, *vpos, *area; 5719 int *hpos, *vpos, *area;
5660 { 5720 {
5661 struct glyph *glyph, *end; 5721 struct glyph *glyph, *end;
5662 struct glyph_row *row; 5722 struct glyph_row *row = NULL;
5663 int x0, i, left_area_width; 5723 int x0, i, left_area_width;
5664 5724
5665 /* Find row containing Y. Give up if some row is not enabled. */ 5725 /* Find row containing Y. Give up if some row is not enabled. */
5666 for (i = 0; i < w->current_matrix->nrows; ++i) 5726 for (i = 0; i < w->current_matrix->nrows; ++i)
5667 { 5727 {
5803 arrange for the help to be displayed. This is done by 5863 arrange for the help to be displayed. This is done by
5804 setting the global variable help_echo to the help string. */ 5864 setting the global variable help_echo to the help string. */
5805 help = Fget_text_property (make_number (glyph->charpos), 5865 help = Fget_text_property (make_number (glyph->charpos),
5806 Qhelp_echo, glyph->object); 5866 Qhelp_echo, glyph->object);
5807 if (!NILP (help)) 5867 if (!NILP (help))
5808 help_echo = help; 5868 {
5869 help_echo = help;
5870 help_echo_object = glyph->object;
5871 help_echo_pos = glyph->charpos;
5872 }
5809 5873
5810 /* Change the mouse pointer according to what is under X/Y. */ 5874 /* Change the mouse pointer according to what is under X/Y. */
5811 map = Fget_text_property (make_number (glyph->charpos), 5875 map = Fget_text_property (make_number (glyph->charpos),
5812 Qlocal_map, glyph->object); 5876 Qlocal_map, glyph->object);
5813 if (!NILP (Fkeymapp (map))) 5877 if (!NILP (Fkeymapp (map)))
6063 6127
6064 /* Check overlays first. */ 6128 /* Check overlays first. */
6065 help = Qnil; 6129 help = Qnil;
6066 for (i = 0; i < noverlays && NILP (help); ++i) 6130 for (i = 0; i < noverlays && NILP (help); ++i)
6067 help = Foverlay_get (overlay_vec[i], Qhelp_echo); 6131 help = Foverlay_get (overlay_vec[i], Qhelp_echo);
6068 6132
6069 /* Try text properties. */ 6133 if (!NILP (help))
6070 if (NILP (help) 6134 {
6071 && ((STRINGP (glyph->object) 6135 help_echo = help;
6136 help_echo_object = w->buffer;
6137 help_echo_pos = pos;
6138 }
6139 else
6140 {
6141 /* Try text properties. */
6142 if ((STRINGP (glyph->object)
6072 && glyph->charpos >= 0 6143 && glyph->charpos >= 0
6073 && glyph->charpos < XSTRING (glyph->object)->size) 6144 && glyph->charpos < XSTRING (glyph->object)->size)
6074 || (BUFFERP (glyph->object) 6145 || (BUFFERP (glyph->object)
6075 && glyph->charpos >= BEGV 6146 && glyph->charpos >= BEGV
6076 && glyph->charpos < ZV))) 6147 && glyph->charpos < ZV))
6077 help = Fget_text_property (make_number (glyph->charpos), 6148 help = Fget_text_property (make_number (glyph->charpos),
6078 Qhelp_echo, glyph->object); 6149 Qhelp_echo, glyph->object);
6079 6150
6080 if (!NILP (help)) 6151 if (!NILP (help))
6081 help_echo = help; 6152 {
6153 help_echo = help;
6154 help_echo_object = glyph->object;
6155 help_echo_pos = glyph->charpos;
6156 }
6157 }
6082 } 6158 }
6083 6159
6084 BEGV = obegv; 6160 BEGV = obegv;
6085 ZV = ozv; 6161 ZV = ozv;
6086 current_buffer = obuf; 6162 current_buffer = obuf;
6307 6383
6308 set_help_echo: 6384 set_help_echo:
6309 6385
6310 /* Set help_echo to a help string.to display for this tool-bar item. 6386 /* Set help_echo to a help string.to display for this tool-bar item.
6311 w32_read_socket does the rest. */ 6387 w32_read_socket does the rest. */
6388 help_echo_object = Qnil;
6389 help_echo_pos = -1;
6312 help_echo = (XVECTOR (f->current_tool_bar_items) 6390 help_echo = (XVECTOR (f->current_tool_bar_items)
6313 ->contents[prop_idx + TOOL_BAR_ITEM_HELP]); 6391 ->contents[prop_idx + TOOL_BAR_ITEM_HELP]);
6314 if (NILP (help_echo)) 6392 if (NILP (help_echo))
6315 help_echo = (XVECTOR (f->current_tool_bar_items) 6393 help_echo = (XVECTOR (f->current_tool_bar_items)
6316 ->contents[prop_idx + TOOL_BAR_ITEM_CAPTION]); 6394 ->contents[prop_idx + TOOL_BAR_ITEM_CAPTION]);
6481 x_update_window_cursor (w, 0); 6559 x_update_window_cursor (w, 0);
6482 cursor_off_p = 1; 6560 cursor_off_p = 1;
6483 } 6561 }
6484 6562
6485 if (end_hpos > start_hpos) 6563 if (end_hpos > start_hpos)
6486 x_draw_glyphs (w, start_x, row, TEXT_AREA, 6564 {
6487 start_hpos, end_hpos, draw, NULL, NULL, 0); 6565 row->mouse_face_p = draw == DRAW_MOUSE_FACE;
6566 x_draw_glyphs (w, start_x, row, TEXT_AREA,
6567 start_hpos, end_hpos, draw, NULL, NULL, 0);
6568 }
6488 } 6569 }
6489 6570
6490 /* If we turned the cursor off, turn it back on. */ 6571 /* If we turned the cursor off, turn it back on. */
6491 if (cursor_off_p) 6572 if (cursor_off_p)
6492 x_display_cursor (w, 1, 6573 x_display_cursor (w, 1,
6526 6607
6527 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; 6608 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
6528 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; 6609 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
6529 dpyinfo->mouse_face_window = Qnil; 6610 dpyinfo->mouse_face_window = Qnil;
6530 } 6611 }
6612
6613
6614 /* Clear any mouse-face on window W. This function is part of the
6615 redisplay interface, and is called from try_window_id and similar
6616 functions to ensure the mouse-highlight is off. */
6617
6618 static void
6619 x_clear_mouse_face (w)
6620 struct window *w;
6621 {
6622 struct w32_display_info *dpyinfo
6623 = FRAME_W32_DISPLAY_INFO (XFRAME (w->frame));
6624 Lisp_Object window;
6625
6626 XSETWINDOW (window, w);
6627 if (EQ (window, dpyinfo->mouse_face_window))
6628 clear_mouse_face (dpyinfo);
6629 }
6630
6531 6631
6532 /* Just discard the mouse face information for frame F, if any. 6632 /* Just discard the mouse face information for frame F, if any.
6533 This is used when the size of F is changed. */ 6633 This is used when the size of F is changed. */
6534 6634
6535 void 6635 void
6685 } 6785 }
6686 6786
6687 6787
6688 /* Scroll bar support. */ 6788 /* Scroll bar support. */
6689 6789
6690 /* Given an window ID, find the struct scroll_bar which manages it. 6790 /* Given a window ID, find the struct scroll_bar which manages it.
6691 This can be called in GC, so we have to make sure to strip off mark 6791 This can be called in GC, so we have to make sure to strip off mark
6692 bits. */ 6792 bits. */
6693 6793
6694 static struct scroll_bar * 6794 static struct scroll_bar *
6695 x_window_to_scroll_bar (window_id) 6795 x_window_to_scroll_bar (window_id)
6829 #else 6929 #else
6830 SetWindowPos (hwnd, hwndAfter, x, y, cx, cy, flags); 6930 SetWindowPos (hwnd, hwndAfter, x, y, cx, cy, flags);
6831 #endif 6931 #endif
6832 } 6932 }
6833 6933
6834 BOOL 6934 void
6835 my_set_focus (f, hwnd) 6935 my_set_focus (f, hwnd)
6836 struct frame * f; 6936 struct frame * f;
6837 HWND hwnd; 6937 HWND hwnd;
6838 { 6938 {
6839 SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS, 6939 SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS,
6840 (WPARAM) hwnd, 0); 6940 (WPARAM) hwnd, 0);
6841 } 6941 }
6842 6942
6843 BOOL 6943 void
6844 my_set_foreground_window (hwnd) 6944 my_set_foreground_window (hwnd)
6845 HWND hwnd; 6945 HWND hwnd;
6846 { 6946 {
6847 SendMessage (hwnd, WM_EMACS_SETFOREGROUND, (WPARAM) hwnd, 0); 6947 SendMessage (hwnd, WM_EMACS_SETFOREGROUND, (WPARAM) hwnd, 0);
6848 } 6948 }
7622 has changed, generate a HELP_EVENT. */ 7722 has changed, generate a HELP_EVENT. */
7623 if (!NILP (help_echo) 7723 if (!NILP (help_echo)
7624 || !NILP (previous_help_echo)) 7724 || !NILP (previous_help_echo))
7625 { 7725 {
7626 Lisp_Object frame; 7726 Lisp_Object frame;
7727 int n;
7627 7728
7628 if (f) 7729 if (f)
7629 XSETFRAME (frame, f); 7730 XSETFRAME (frame, f);
7630 else 7731 else
7631 frame = Qnil; 7732 frame = Qnil;
7632 7733
7633 any_help_event_p = 1; 7734 any_help_event_p = 1;
7634 bufp->kind = HELP_EVENT; 7735 n = gen_help_event (bufp, help_echo, frame,
7635 bufp->frame_or_window = frame; 7736 help_echo_object, help_echo_pos);
7636 bufp->arg = help_echo; 7737 bufp += n, count += n, numchars -= n;
7637 ++bufp, ++count, --numchars;
7638 } 7738 }
7639 break; 7739 break;
7640 7740
7641 case WM_LBUTTONDOWN: 7741 case WM_LBUTTONDOWN:
7642 case WM_LBUTTONUP: 7742 case WM_LBUTTONUP:
7743 { 7843 {
7744 HMENU menu = (HMENU) msg.msg.lParam; 7844 HMENU menu = (HMENU) msg.msg.lParam;
7745 UINT menu_item = (UINT) LOWORD (msg.msg.wParam); 7845 UINT menu_item = (UINT) LOWORD (msg.msg.wParam);
7746 UINT flags = (UINT) HIWORD (msg.msg.wParam); 7846 UINT flags = (UINT) HIWORD (msg.msg.wParam);
7747 7847
7748 /* NTEMACS_TODO: Can't call the below with input blocked,
7749 as it may result in hooks being called if the window
7750 layout needs to change to display the message, and
7751 Feval will abort if input is blocked. But unblocking
7752 temporarily is not the best solution. */
7753 UNBLOCK_INPUT;
7754 w32_menu_display_help (menu, menu_item, flags); 7848 w32_menu_display_help (menu, menu_item, flags);
7755 BLOCK_INPUT;
7756 } 7849 }
7757 break; 7850 break;
7758 7851
7759 case WM_DROPFILES: 7852 case WM_DROPFILES:
7760 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 7853 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
7961 Do it only if there's something to cancel. 8054 Do it only if there's something to cancel.
7962 Otherwise, the startup message is cleared when 8055 Otherwise, the startup message is cleared when
7963 the mouse leaves the frame. */ 8056 the mouse leaves the frame. */
7964 if (any_help_event_p) 8057 if (any_help_event_p)
7965 { 8058 {
8059 int n;
8060
7966 XSETFRAME (frame, f); 8061 XSETFRAME (frame, f);
7967 bufp->kind = HELP_EVENT; 8062 n = gen_help_event (bufp, Qnil, frame, Qnil, 0);
7968 bufp->frame_or_window = frame; 8063 bufp += n, count += n, numchars -=n;
7969 bufp->arg = Qnil;
7970 ++bufp, ++count, --numchars;
7971 } 8064 }
7972 } 8065 }
7973 8066
7974 dpyinfo->grabbed = 0; 8067 dpyinfo->grabbed = 0;
7975 check_visibility = 1; 8068 check_visibility = 1;
8713 FRAME_FONTSET (f) = -1; 8806 FRAME_FONTSET (f) = -1;
8714 8807
8715 /* Compute the scroll bar width in character columns. */ 8808 /* Compute the scroll bar width in character columns. */
8716 if (f->scroll_bar_pixel_width > 0) 8809 if (f->scroll_bar_pixel_width > 0)
8717 { 8810 {
8718 int wid = FONT_WIDTH (f->output_data.w32->font); 8811 int wid = FONT_WIDTH (FRAME_FONT (f));
8719 f->scroll_bar_cols = (f->scroll_bar_pixel_width + wid-1) / wid; 8812 f->scroll_bar_cols = (f->scroll_bar_pixel_width + wid-1) / wid;
8720 } 8813 }
8721 else 8814 else
8722 f->scroll_bar_cols = 2; 8815 {
8816 int wid = FONT_WIDTH (FRAME_FONT (f));
8817 f->scroll_bar_cols = (14 + wid - 1) / wid;
8818 }
8723 8819
8724 /* Now make the frame display the given font. */ 8820 /* Now make the frame display the given font. */
8725 if (FRAME_W32_WINDOW (f) != 0) 8821 if (FRAME_W32_WINDOW (f) != 0)
8726 { 8822 {
8727 frame_update_line_height (f); 8823 frame_update_line_height (f);
8728 x_set_window_size (f, 0, f->width, f->height); 8824 x_set_window_size (f, 0, f->width, f->height);
8729 } 8825 }
8730 else 8826 else
8731 /* If we are setting a new frame's font for the first time, 8827 /* If we are setting a new frame's font for the first time,
8732 there are no faces yet, so this font's height is the line height. */ 8828 there are no faces yet, so this font's height is the line height. */
8733 f->output_data.w32->line_height = FONT_HEIGHT (f->output_data.w32->font); 8829 f->output_data.w32->line_height = FONT_HEIGHT (FRAME_FONT (f));
8734 8830
8735 return build_string (fontp->full_name); 8831 return build_string (fontp->full_name);
8736 } 8832 }
8737 8833
8738 /* Give frame F the fontset named FONTSETNAME as its default font, and 8834 /* Give frame F the fontset named FONTSETNAME as its default font, and
8946 x_calc_absolute_position (f); 9042 x_calc_absolute_position (f);
8947 9043
8948 BLOCK_INPUT; 9044 BLOCK_INPUT;
8949 x_wm_set_size_hint (f, (long) 0, 0); 9045 x_wm_set_size_hint (f, (long) 0, 0);
8950 9046
8951 /* It is a mystery why we need to add the border_width here
8952 when the frame is already visible, but experiment says we do. */
8953 modified_left = f->output_data.w32->left_pos; 9047 modified_left = f->output_data.w32->left_pos;
8954 modified_top = f->output_data.w32->top_pos; 9048 modified_top = f->output_data.w32->top_pos;
8955 #ifndef HAVE_NTGUI
8956 /* Do not add in border widths under W32. */
8957 if (change_gravity != 0)
8958 {
8959 modified_left += f->output_data.w32->border_width;
8960 modified_top += f->output_data.w32->border_width;
8961 }
8962 #endif
8963 9049
8964 my_set_window_pos (FRAME_W32_WINDOW (f), 9050 my_set_window_pos (FRAME_W32_WINDOW (f),
8965 NULL, 9051 NULL,
8966 modified_left, modified_top, 9052 modified_left, modified_top,
8967 0, 0, 9053 0, 0,
9019 change request eventually, and we'll hear how it went when the 9105 change request eventually, and we'll hear how it went when the
9020 ConfigureNotify event gets here. 9106 ConfigureNotify event gets here.
9021 9107
9022 We could just not bother storing any of this information here, 9108 We could just not bother storing any of this information here,
9023 and let the ConfigureNotify event set everything up, but that 9109 and let the ConfigureNotify event set everything up, but that
9024 might be kind of confusing to the lisp code, since size changes 9110 might be kind of confusing to the Lisp code, since size changes
9025 wouldn't be reported in the frame parameters until some random 9111 wouldn't be reported in the frame parameters until some random
9026 point in the future when the ConfigureNotify event arrives. 9112 point in the future when the ConfigureNotify event arrives.
9027 9113
9028 We pass 1 for DELAY since we can't run Lisp code inside of 9114 We pass 1 for DELAY since we can't run Lisp code inside of
9029 a BLOCK_INPUT. */ 9115 a BLOCK_INPUT. */
9049 UNBLOCK_INPUT; 9135 UNBLOCK_INPUT;
9050 } 9136 }
9051 9137
9052 /* Mouse warping. */ 9138 /* Mouse warping. */
9053 9139
9140 void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
9141
9142 void
9143 x_set_mouse_position (f, x, y)
9144 struct frame *f;
9145 int x, y;
9146 {
9147 int pix_x, pix_y;
9148
9149 pix_x = CHAR_TO_PIXEL_COL (f, x) + FONT_WIDTH (f->output_data.w32->font) / 2;
9150 pix_y = CHAR_TO_PIXEL_ROW (f, y) + f->output_data.w32->line_height / 2;
9151
9152 if (pix_x < 0) pix_x = 0;
9153 if (pix_x > PIXEL_WIDTH (f)) pix_x = PIXEL_WIDTH (f);
9154
9155 if (pix_y < 0) pix_y = 0;
9156 if (pix_y > PIXEL_HEIGHT (f)) pix_y = PIXEL_HEIGHT (f);
9157
9158 x_set_mouse_pixel_position (f, pix_x, pix_y);
9159 }
9160
9054 void 9161 void
9055 x_set_mouse_pixel_position (f, pix_x, pix_y) 9162 x_set_mouse_pixel_position (f, pix_x, pix_y)
9056 struct frame *f; 9163 struct frame *f;
9057 int pix_x, pix_y; 9164 int pix_x, pix_y;
9058 { 9165 {
9069 SetCursorPos (pt.x, pt.y); 9176 SetCursorPos (pt.x, pt.y);
9070 9177
9071 UNBLOCK_INPUT; 9178 UNBLOCK_INPUT;
9072 } 9179 }
9073 9180
9074 void
9075 x_set_mouse_position (f, x, y)
9076 struct frame *f;
9077 int x, y;
9078 {
9079 int pix_x, pix_y;
9080
9081 pix_x = CHAR_TO_PIXEL_COL (f, x) + FONT_WIDTH (f->output_data.w32->font) / 2;
9082 pix_y = CHAR_TO_PIXEL_ROW (f, y) + f->output_data.w32->line_height / 2;
9083
9084 if (pix_x < 0) pix_x = 0;
9085 if (pix_x > PIXEL_WIDTH (f)) pix_x = PIXEL_WIDTH (f);
9086
9087 if (pix_y < 0) pix_y = 0;
9088 if (pix_y > PIXEL_HEIGHT (f)) pix_y = PIXEL_HEIGHT (f);
9089
9090 x_set_mouse_pixel_position (f, pix_x, pix_y);
9091 }
9092 9181
9093 /* focus shifting, raising and lowering. */ 9182 /* focus shifting, raising and lowering. */
9094 9183
9184 void
9095 x_focus_on_frame (f) 9185 x_focus_on_frame (f)
9096 struct frame *f; 9186 struct frame *f;
9097 { 9187 {
9098 struct w32_display_info *dpyinfo = &one_w32_display_info; 9188 struct w32_display_info *dpyinfo = &one_w32_display_info;
9099 9189
9107 #endif 9197 #endif
9108 my_set_foreground_window (FRAME_W32_WINDOW (f)); 9198 my_set_foreground_window (FRAME_W32_WINDOW (f));
9109 UNBLOCK_INPUT; 9199 UNBLOCK_INPUT;
9110 } 9200 }
9111 9201
9202 void
9112 x_unfocus_frame (f) 9203 x_unfocus_frame (f)
9113 struct frame *f; 9204 struct frame *f;
9114 { 9205 {
9115 } 9206 }
9116 9207
9186 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); 9277 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
9187 UNBLOCK_INPUT; 9278 UNBLOCK_INPUT;
9188 } 9279 }
9189 9280
9190 static void 9281 static void
9191 w32_frame_raise_lower (f, raise) 9282 w32_frame_raise_lower (f, raise_flag)
9192 FRAME_PTR f; 9283 FRAME_PTR f;
9193 int raise; 9284 int raise_flag;
9194 { 9285 {
9195 if (raise) 9286 if (raise_flag)
9196 x_raise_frame (f); 9287 x_raise_frame (f);
9197 else 9288 else
9198 x_lower_frame (f); 9289 x_lower_frame (f);
9199 } 9290 }
9200 9291
9205 the frame, this will return before the user finishes doing that. 9296 the frame, this will return before the user finishes doing that.
9206 The frame will not actually be visible at that time, 9297 The frame will not actually be visible at that time,
9207 but it will become visible later when the window manager 9298 but it will become visible later when the window manager
9208 finishes with it. */ 9299 finishes with it. */
9209 9300
9301 void
9210 x_make_frame_visible (f) 9302 x_make_frame_visible (f)
9211 struct frame *f; 9303 struct frame *f;
9212 { 9304 {
9213 Lisp_Object type; 9305 Lisp_Object type;
9214 9306
9615 x_after_update_window_line, 9707 x_after_update_window_line,
9616 x_update_window_begin, 9708 x_update_window_begin,
9617 x_update_window_end, 9709 x_update_window_end,
9618 w32_cursor_to, 9710 w32_cursor_to,
9619 x_flush, 9711 x_flush,
9712 x_clear_mouse_face,
9620 x_get_glyph_overhangs, 9713 x_get_glyph_overhangs,
9621 x_fix_overlapping_area 9714 x_fix_overlapping_area
9622 }; 9715 };
9623 9716
9624 void 9717 void
9778 Far-East Languages on Windows 95/98 from working properly.\n\ 9871 Far-East Languages on Windows 95/98 from working properly.\n\
9779 NT uses Unicode internally anyway, so this flag will probably have no\n\ 9872 NT uses Unicode internally anyway, so this flag will probably have no\n\
9780 affect on NT machines."); 9873 affect on NT machines.");
9781 w32_enable_unicode_output = 1; 9874 w32_enable_unicode_output = 1;
9782 9875
9876 help_echo = Qnil;
9783 staticpro (&help_echo); 9877 staticpro (&help_echo);
9784 help_echo = Qnil; 9878 help_echo_object = Qnil;
9879 staticpro (&help_echo_object);
9880 previous_help_echo = Qnil;
9785 staticpro (&previous_help_echo); 9881 staticpro (&previous_help_echo);
9786 previous_help_echo = Qnil;
9787 9882
9788 DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p, 9883 DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p,
9789 "*Non-nil means draw block cursor as wide as the glyph under it.\n\ 9884 "*Non-nil means draw block cursor as wide as the glyph under it.\n\
9790 For example, if a block cursor is over a tab, it will be drawn as\n\ 9885 For example, if a block cursor is over a tab, it will be drawn as\n\
9791 wide as that tab on the display."); 9886 wide as that tab on the display.");