Mercurial > emacs
comparison src/xdisp.c @ 90596:6823a91487f2
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 399-413)
- Update from CVS
- Rcirc update from Ryan Yeske
- Merge from gnus--rel--5.10
- Miscellaneous tq-related fixes.
* gnus--rel--5.10 (patch 126-127)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-105
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 28 Aug 2006 04:33:45 +0000 |
parents | 858cb33ae39d 666bd542be19 |
children | c358d0861b16 |
comparison
equal
deleted
inserted
replaced
90595:fd59c4164a14 | 90596:6823a91487f2 |
---|---|
714 Lisp_Object Vresize_mini_windows; | 714 Lisp_Object Vresize_mini_windows; |
715 | 715 |
716 /* Buffer being redisplayed -- for redisplay_window_error. */ | 716 /* Buffer being redisplayed -- for redisplay_window_error. */ |
717 | 717 |
718 struct buffer *displayed_buffer; | 718 struct buffer *displayed_buffer; |
719 | |
720 /* Space between overline and text. */ | |
721 | |
722 EMACS_INT overline_margin; | |
719 | 723 |
720 /* Value returned from text property handlers (see below). */ | 724 /* Value returned from text property handlers (see below). */ |
721 | 725 |
722 enum prop_handled | 726 enum prop_handled |
723 { | 727 { |
9543 /* Build desired tool-bar items from keymaps. */ | 9547 /* Build desired tool-bar items from keymaps. */ |
9544 new_tool_bar = tool_bar_items (Fcopy_sequence (f->tool_bar_items), | 9548 new_tool_bar = tool_bar_items (Fcopy_sequence (f->tool_bar_items), |
9545 &new_n_tool_bar); | 9549 &new_n_tool_bar); |
9546 | 9550 |
9547 /* Redisplay the tool-bar if we changed it. */ | 9551 /* Redisplay the tool-bar if we changed it. */ |
9548 if (NILP (Fequal (new_tool_bar, f->tool_bar_items))) | 9552 if (new_n_tool_bar != f->n_tool_bar_items |
9553 || NILP (Fequal (new_tool_bar, f->tool_bar_items))) | |
9549 { | 9554 { |
9550 /* Redisplay that happens asynchronously due to an expose event | 9555 /* Redisplay that happens asynchronously due to an expose event |
9551 may access f->tool_bar_items. Make sure we update both | 9556 may access f->tool_bar_items. Make sure we update both |
9552 variables within BLOCK_INPUT so no such event interrupts. */ | 9557 variables within BLOCK_INPUT so no such event interrupts. */ |
9553 BLOCK_INPUT; | 9558 BLOCK_INPUT; |
20609 } | 20614 } |
20610 | 20615 |
20611 /* If face has an overline, add the height of the overline | 20616 /* If face has an overline, add the height of the overline |
20612 (1 pixel) and a 1 pixel margin to the character height. */ | 20617 (1 pixel) and a 1 pixel margin to the character height. */ |
20613 if (face->overline_p) | 20618 if (face->overline_p) |
20614 it->ascent += 2; | 20619 it->ascent += overline_margin; |
20615 | 20620 |
20616 if (it->constrain_row_ascent_descent_p) | 20621 if (it->constrain_row_ascent_descent_p) |
20617 { | 20622 { |
20618 if (it->ascent > it->max_ascent) | 20623 if (it->ascent > it->max_ascent) |
20619 it->ascent = it->max_ascent; | 20624 it->ascent = it->max_ascent; |
20809 } | 20814 } |
20810 | 20815 |
20811 /* If face has an overline, add the height of the overline | 20816 /* If face has an overline, add the height of the overline |
20812 (1 pixel) and a 1 pixel margin to the character height. */ | 20817 (1 pixel) and a 1 pixel margin to the character height. */ |
20813 if (face->overline_p) | 20818 if (face->overline_p) |
20814 it->ascent += 2; | 20819 it->ascent += overline_margin; |
20815 | 20820 |
20816 take_vertical_position_into_account (it); | 20821 take_vertical_position_into_account (it); |
20817 | 20822 |
20818 if (it->glyph_row) | 20823 if (it->glyph_row) |
20819 append_glyph (it); | 20824 append_glyph (it); |
21164 } | 21169 } |
21165 | 21170 |
21166 /* If face has an overline, add the height of the overline | 21171 /* If face has an overline, add the height of the overline |
21167 (1 pixel) and a 1 pixel margin to the character height. */ | 21172 (1 pixel) and a 1 pixel margin to the character height. */ |
21168 if (face->overline_p) | 21173 if (face->overline_p) |
21169 it->ascent += 2; | 21174 it->ascent += overline_margin; |
21170 | 21175 |
21171 take_vertical_position_into_account (it); | 21176 take_vertical_position_into_account (it); |
21172 | 21177 |
21173 if (it->glyph_row) | 21178 if (it->glyph_row) |
21174 append_composite_glyph (it); | 21179 append_composite_glyph (it); |
21540 cursor_type = get_specified_cursor_type (b->cursor_type, width); | 21545 cursor_type = get_specified_cursor_type (b->cursor_type, width); |
21541 | 21546 |
21542 /* Use normal cursor if not blinked off. */ | 21547 /* Use normal cursor if not blinked off. */ |
21543 if (!w->cursor_off_p) | 21548 if (!w->cursor_off_p) |
21544 { | 21549 { |
21545 if (glyph != NULL && glyph->type == IMAGE_GLYPH) { | 21550 if (glyph != NULL && glyph->type == IMAGE_GLYPH) |
21546 if (cursor_type == FILLED_BOX_CURSOR) | 21551 { |
21547 cursor_type = HOLLOW_BOX_CURSOR; | 21552 if (cursor_type == FILLED_BOX_CURSOR) |
21553 { | |
21554 /* Using a block cursor on large images can be very annoying. | |
21555 So use a hollow cursor for "large" images. */ | |
21556 struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id); | |
21557 if (img != NULL && IMAGEP (img->spec)) | |
21558 { | |
21559 /* Arbitrarily, interpret "Large" as >32x32 and >NxN | |
21560 where N = size of default frame font size. | |
21561 This should cover most of the "tiny" icons people may use. */ | |
21562 if (img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w)) | |
21563 || img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w))) | |
21564 cursor_type = HOLLOW_BOX_CURSOR; | |
21565 } | |
21566 } | |
21567 else if (cursor_type != NO_CURSOR) | |
21568 { | |
21569 /* Display current only supports BOX and HOLLOW cursors for images. | |
21570 So for now, unconditionally use a HOLLOW cursor when cursor is | |
21571 not a solid box cursor. */ | |
21572 cursor_type = HOLLOW_BOX_CURSOR; | |
21573 } | |
21548 } | 21574 } |
21549 return cursor_type; | 21575 return cursor_type; |
21550 } | 21576 } |
21551 | 21577 |
21552 /* Cursor is blinked off, so determine how to "toggle" it. */ | 21578 /* Cursor is blinked off, so determine how to "toggle" it. */ |
24441 | 24467 |
24442 DEFVAR_BOOL ("inhibit-try-cursor-movement", &inhibit_try_cursor_movement, | 24468 DEFVAR_BOOL ("inhibit-try-cursor-movement", &inhibit_try_cursor_movement, |
24443 doc: /* Inhibit try_cursor_movement display optimization. */); | 24469 doc: /* Inhibit try_cursor_movement display optimization. */); |
24444 inhibit_try_cursor_movement = 0; | 24470 inhibit_try_cursor_movement = 0; |
24445 #endif /* GLYPH_DEBUG */ | 24471 #endif /* GLYPH_DEBUG */ |
24472 | |
24473 DEFVAR_INT ("overline-margin", &overline_margin, | |
24474 doc: /* *Space between overline and text, in pixels. | |
24475 The default value is 2: the height of the overline (1 pixel) plus 1 pixel | |
24476 margin to the caracter height. */); | |
24477 overline_margin = 2; | |
24446 } | 24478 } |
24447 | 24479 |
24448 | 24480 |
24449 /* Initialize this module when Emacs starts. */ | 24481 /* Initialize this module when Emacs starts. */ |
24450 | 24482 |