diff options
| author | Chong Yidong | 2010-07-10 15:01:01 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-07-10 15:01:01 -0400 |
| commit | 7ac1c664547ca88fd6c0ff65ef5e780b1c5efcb0 (patch) | |
| tree | 301c219611060db34a983f5b7dba58cf1fa93b69 /src | |
| parent | 481044622937b001ee07a6f8c3f81c1e73ef9eaf (diff) | |
| parent | 2ec1b5ee3464999a18b8197101e8bf08a3c564a8 (diff) | |
| download | emacs-7ac1c664547ca88fd6c0ff65ef5e780b1c5efcb0.tar.gz emacs-7ac1c664547ca88fd6c0ff65ef5e780b1c5efcb0.zip | |
Merge changes from emacs-23 branch.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 74 | ||||
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/dispextern.h | 8 | ||||
| -rw-r--r-- | src/frame.c | 14 | ||||
| -rw-r--r-- | src/fringe.c | 281 | ||||
| -rw-r--r-- | src/image.c | 4 | ||||
| -rw-r--r-- | src/keyboard.c | 49 | ||||
| -rw-r--r-- | src/keymap.c | 10 | ||||
| -rw-r--r-- | src/lread.c | 22 | ||||
| -rw-r--r-- | src/nsterm.m | 15 | ||||
| -rw-r--r-- | src/w32fns.c | 10 | ||||
| -rw-r--r-- | src/w32term.c | 17 | ||||
| -rw-r--r-- | src/xdisp.c | 1 | ||||
| -rw-r--r-- | src/xfaces.c | 1 | ||||
| -rw-r--r-- | src/xfns.c | 6 | ||||
| -rw-r--r-- | src/xmenu.c | 8 | ||||
| -rw-r--r-- | src/xterm.c | 17 |
17 files changed, 377 insertions, 162 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0bd64c2ae72..404af1949e9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -811,7 +811,55 @@ | |||
| 811 | Improve documentation. Return font regardless of use_system_font. | 811 | Improve documentation. Return font regardless of use_system_font. |
| 812 | (syms_of_xsettings): Improve documentation for font-use-system-font. | 812 | (syms_of_xsettings): Improve documentation for font-use-system-font. |
| 813 | 813 | ||
| 814 | 2009-06-17 Naohiro Aota <naota@elisp.net> (tiny change) | 814 | 2010-07-10 Chong Yidong <cyd@stupidchicken.com> |
| 815 | |||
| 816 | * xfaces.c (realize_face): Garbage the frame if a face is removed | ||
| 817 | (Bug#6593). | ||
| 818 | |||
| 819 | 2010-07-05 Andreas Schwab <schwab@linux-m68k.org> | ||
| 820 | |||
| 821 | * keyboard.c: Remove duplicate <setjmp.h>. | ||
| 822 | (read_key_sequence): Remove volatile qualifiers. | ||
| 823 | |||
| 824 | 2010-07-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 825 | |||
| 826 | * dispextern.h (FRINGE_HEIGHT_BITS): New define. | ||
| 827 | (struct glyph_row): New members left_fringe_offset and | ||
| 828 | right_fringe_offset. | ||
| 829 | |||
| 830 | * xterm.c (x_draw_fringe_bitmap): Don't clip bottom aligned bitmap | ||
| 831 | specially. | ||
| 832 | * w32term.c (w32_draw_fringe_bitmap): Likewise. | ||
| 833 | * nsterm.m (ns_draw_fringe_bitmap): Likewise. | ||
| 834 | |||
| 835 | * fringe.c (draw_fringe_bitmap_1): Don't clip bitmap here. | ||
| 836 | Take account of bitmap offset. | ||
| 837 | (draw_window_fringes): Take account of window vscroll. | ||
| 838 | (update_window_fringes): Likewise. Extend top-aligned top indicator | ||
| 839 | or bottom-aligned bottom indicator to adjacent rows if it doesn't fit | ||
| 840 | in one row. Don't set redraw_fringe_bitmaps_p outside row comparison. | ||
| 841 | Set left_fringe_offset and right_fringe_offset (Bug#5634, Bug#6325). | ||
| 842 | |||
| 843 | 2010-07-04 Juanma Barranquero <lekktu@gmail.com> | ||
| 844 | |||
| 845 | * w32fns.c (Qtooltip): Declare. | ||
| 846 | Suggested by Andy Moreton <andrewjmoreton@gmail.com>. | ||
| 847 | |||
| 848 | 2010-07-03 Jan Djärv <jan.h.d@swipnet.se> | ||
| 849 | |||
| 850 | * xmenu.c (x_activate_menubar): Send Press/Release for Gtk+ to avoid | ||
| 851 | grab on just Press (Bug#6499). | ||
| 852 | |||
| 853 | 2010-07-02 Chong Yidong <cyd@stupidchicken.com> | ||
| 854 | |||
| 855 | * frame.c (Qtooltip): New var. | ||
| 856 | (delete_frame): Use it. Fix faulty if statement. Don't update | ||
| 857 | mode line for tooltip frames. Suggested by Martin Rudalics. | ||
| 858 | |||
| 859 | * xfns.c (x_create_tip_frame): | ||
| 860 | * w32fns.c (x_create_tip_frame): Use it. | ||
| 861 | |||
| 862 | 2010-06-17 Naohiro Aota <naota@elisp.net> (tiny change) | ||
| 815 | 863 | ||
| 816 | * xftfont.c (xftfont_open): Check font width one by one also when | 864 | * xftfont.c (xftfont_open): Check font width one by one also when |
| 817 | spacing is dual. | 865 | spacing is dual. |
| @@ -990,6 +1038,30 @@ | |||
| 990 | 1038 | ||
| 991 | * m/ibms390x.h: Rather than duplicating ibms390.h, just include it. | 1039 | * m/ibms390x.h: Rather than duplicating ibms390.h, just include it. |
| 992 | 1040 | ||
| 1041 | 2010-06-26 Andreas Schwab <schwab@linux-m68k.org> | ||
| 1042 | |||
| 1043 | * alloc.c (Fmake_byte_code): Don't access undefined argument | ||
| 1044 | (Bug#6517). | ||
| 1045 | |||
| 1046 | 2010-06-25 Chong Yidong <cyd@stupidchicken.com> | ||
| 1047 | |||
| 1048 | * xdisp.c (next_element_from_image): Ensure that after-strings are | ||
| 1049 | read the next time we hit handle_stop (Bug#1336). | ||
| 1050 | |||
| 1051 | 2010-06-23 Andreas Schwab <schwab@linux-m68k.org> | ||
| 1052 | |||
| 1053 | * lread.c (read1): Signal error if #s is not followed by paren. | ||
| 1054 | |||
| 1055 | 2010-06-19 Chong Yidong <cyd@stupidchicken.com> | ||
| 1056 | |||
| 1057 | * image.c (free_image): Mark frame as garbaged (Bug#6426). | ||
| 1058 | |||
| 1059 | * keymap.c (Fdefine_key): Doc fix (Bug#6460). | ||
| 1060 | |||
| 1061 | 2010-06-15 Glenn Morris <rgm@gnu.org> | ||
| 1062 | |||
| 1063 | * editfns.c (Fbyte_to_string): Pacify compiler. | ||
| 1064 | |||
| 993 | 2010-06-09 Stefan Monnier <monnier@iro.umontreal.ca> | 1065 | 2010-06-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 994 | 1066 | ||
| 995 | * dbusbind.c (xd_append_arg): Don't "make-unibyte" the string. | 1067 | * dbusbind.c (xd_append_arg): Don't "make-unibyte" the string. |
diff --git a/src/alloc.c b/src/alloc.c index 2a15fd0d63d..36b197e5eac 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3030,7 +3030,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT | |||
| 3030 | else | 3030 | else |
| 3031 | val = Fmake_vector (len, Qnil); | 3031 | val = Fmake_vector (len, Qnil); |
| 3032 | 3032 | ||
| 3033 | if (STRINGP (args[1]) && STRING_MULTIBYTE (args[1])) | 3033 | if (nargs > 1 && STRINGP (args[1]) && STRING_MULTIBYTE (args[1])) |
| 3034 | /* BYTECODE-STRING must have been produced by Emacs 20.2 or the | 3034 | /* BYTECODE-STRING must have been produced by Emacs 20.2 or the |
| 3035 | earlier because they produced a raw 8-bit string for byte-code | 3035 | earlier because they produced a raw 8-bit string for byte-code |
| 3036 | and now such a byte-code string is loaded as multibyte while | 3036 | and now such a byte-code string is loaded as multibyte while |
diff --git a/src/dispextern.h b/src/dispextern.h index 9bafb49dd91..5ca7e813a1e 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -105,6 +105,8 @@ enum window_part | |||
| 105 | /* Number of bits allocated to store fringe bitmap numbers. */ | 105 | /* Number of bits allocated to store fringe bitmap numbers. */ |
| 106 | #define FRINGE_ID_BITS 16 | 106 | #define FRINGE_ID_BITS 16 |
| 107 | 107 | ||
| 108 | /* Number of bits allocated to store fringe bitmap height. */ | ||
| 109 | #define FRINGE_HEIGHT_BITS 8 | ||
| 108 | 110 | ||
| 109 | 111 | ||
| 110 | /*********************************************************************** | 112 | /*********************************************************************** |
| @@ -800,6 +802,12 @@ struct glyph_row | |||
| 800 | /* Face of the right fringe glyph. */ | 802 | /* Face of the right fringe glyph. */ |
| 801 | unsigned right_fringe_face_id : FACE_ID_BITS; | 803 | unsigned right_fringe_face_id : FACE_ID_BITS; |
| 802 | 804 | ||
| 805 | /* Vertical offset of the left fringe bitmap. */ | ||
| 806 | signed left_fringe_offset : FRINGE_HEIGHT_BITS; | ||
| 807 | |||
| 808 | /* Vertical offset of the right fringe bitmap. */ | ||
| 809 | signed right_fringe_offset : FRINGE_HEIGHT_BITS; | ||
| 810 | |||
| 803 | /* 1 means that we must draw the bitmaps of this row. */ | 811 | /* 1 means that we must draw the bitmaps of this row. */ |
| 804 | unsigned redraw_fringe_bitmaps_p : 1; | 812 | unsigned redraw_fringe_bitmaps_p : 1; |
| 805 | 813 | ||
diff --git a/src/frame.c b/src/frame.c index 1bbebcde133..cebec92c426 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -100,6 +100,7 @@ Lisp_Object Qgeometry; /* Not used */ | |||
| 100 | Lisp_Object Qheight, Qwidth; | 100 | Lisp_Object Qheight, Qwidth; |
| 101 | Lisp_Object Qleft, Qright; | 101 | Lisp_Object Qleft, Qright; |
| 102 | Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name; | 102 | Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name; |
| 103 | Lisp_Object Qtooltip; | ||
| 103 | Lisp_Object Qinternal_border_width; | 104 | Lisp_Object Qinternal_border_width; |
| 104 | Lisp_Object Qmouse_color; | 105 | Lisp_Object Qmouse_color; |
| 105 | Lisp_Object Qminibuffer; | 106 | Lisp_Object Qminibuffer; |
| @@ -1302,7 +1303,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1302 | struct frame *sf = SELECTED_FRAME (); | 1303 | struct frame *sf = SELECTED_FRAME (); |
| 1303 | struct kboard *kb; | 1304 | struct kboard *kb; |
| 1304 | 1305 | ||
| 1305 | int minibuffer_selected; | 1306 | int minibuffer_selected, tooltip_frame; |
| 1306 | 1307 | ||
| 1307 | if (EQ (frame, Qnil)) | 1308 | if (EQ (frame, Qnil)) |
| 1308 | { | 1309 | { |
| @@ -1354,13 +1355,15 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1354 | } | 1355 | } |
| 1355 | } | 1356 | } |
| 1356 | 1357 | ||
| 1358 | tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip"))); | ||
| 1359 | |||
| 1357 | /* Run `delete-frame-functions' unless FORCE is `noelisp' or | 1360 | /* Run `delete-frame-functions' unless FORCE is `noelisp' or |
| 1358 | frame is a tooltip. FORCE is set to `noelisp' when handling | 1361 | frame is a tooltip. FORCE is set to `noelisp' when handling |
| 1359 | a disconnect from the terminal, so we don't dare call Lisp | 1362 | a disconnect from the terminal, so we don't dare call Lisp |
| 1360 | code. */ | 1363 | code. */ |
| 1361 | if (NILP (Vrun_hooks) || !NILP (Fframe_parameter (frame, intern ("tooltip")))) | 1364 | if (NILP (Vrun_hooks) || tooltip_frame) |
| 1362 | ; | 1365 | ; |
| 1363 | if (EQ (force, Qnoelisp)) | 1366 | else if (EQ (force, Qnoelisp)) |
| 1364 | pending_funcalls | 1367 | pending_funcalls |
| 1365 | = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), | 1368 | = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), |
| 1366 | pending_funcalls); | 1369 | pending_funcalls); |
| @@ -1606,7 +1609,8 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1606 | } | 1609 | } |
| 1607 | 1610 | ||
| 1608 | /* Cause frame titles to update--necessary if we now have just one frame. */ | 1611 | /* Cause frame titles to update--necessary if we now have just one frame. */ |
| 1609 | update_mode_lines = 1; | 1612 | if (!tooltip_frame) |
| 1613 | update_mode_lines = 1; | ||
| 1610 | 1614 | ||
| 1611 | return Qnil; | 1615 | return Qnil; |
| 1612 | } | 1616 | } |
| @@ -4324,6 +4328,8 @@ syms_of_frame (void) | |||
| 4324 | staticpro (&Qicon_left); | 4328 | staticpro (&Qicon_left); |
| 4325 | Qicon_top = intern_c_string ("icon-top"); | 4329 | Qicon_top = intern_c_string ("icon-top"); |
| 4326 | staticpro (&Qicon_top); | 4330 | staticpro (&Qicon_top); |
| 4331 | Qtooltip = intern_c_string ("tooltip"); | ||
| 4332 | staticpro (&Qtooltip); | ||
| 4327 | Qleft = intern_c_string ("left"); | 4333 | Qleft = intern_c_string ("left"); |
| 4328 | staticpro (&Qleft); | 4334 | staticpro (&Qleft); |
| 4329 | Qright = intern_c_string ("right"); | 4335 | Qright = intern_c_string ("right"); |
diff --git a/src/fringe.c b/src/fringe.c index 50d5a5c9747..399779009dc 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -555,23 +555,26 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o | |||
| 555 | struct fringe_bitmap *fb; | 555 | struct fringe_bitmap *fb; |
| 556 | int period; | 556 | int period; |
| 557 | int face_id = DEFAULT_FACE_ID; | 557 | int face_id = DEFAULT_FACE_ID; |
| 558 | int offset, header_line_height; | ||
| 558 | 559 | ||
| 559 | p.cursor_p = 0; | ||
| 560 | p.overlay_p = (overlay & 1) == 1; | 560 | p.overlay_p = (overlay & 1) == 1; |
| 561 | p.cursor_p = (overlay & 2) == 2; | 561 | p.cursor_p = (overlay & 2) == 2; |
| 562 | 562 | ||
| 563 | if (which != NO_FRINGE_BITMAP) | 563 | if (which != NO_FRINGE_BITMAP) |
| 564 | { | 564 | { |
| 565 | offset = 0; | ||
| 565 | } | 566 | } |
| 566 | else if (left_p) | 567 | else if (left_p) |
| 567 | { | 568 | { |
| 568 | which = row->left_fringe_bitmap; | 569 | which = row->left_fringe_bitmap; |
| 569 | face_id = row->left_fringe_face_id; | 570 | face_id = row->left_fringe_face_id; |
| 571 | offset = row->left_fringe_offset; | ||
| 570 | } | 572 | } |
| 571 | else | 573 | else |
| 572 | { | 574 | { |
| 573 | which = row->right_fringe_bitmap; | 575 | which = row->right_fringe_bitmap; |
| 574 | face_id = row->right_fringe_face_id; | 576 | face_id = row->right_fringe_face_id; |
| 577 | offset = row->right_fringe_offset; | ||
| 575 | } | 578 | } |
| 576 | 579 | ||
| 577 | if (face_id == DEFAULT_FACE_ID) | 580 | if (face_id == DEFAULT_FACE_ID) |
| @@ -591,7 +594,7 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o | |||
| 591 | period = fb->period; | 594 | period = fb->period; |
| 592 | 595 | ||
| 593 | /* Convert row to frame coordinates. */ | 596 | /* Convert row to frame coordinates. */ |
| 594 | p.y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); | 597 | p.y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y) + offset; |
| 595 | 598 | ||
| 596 | p.which = which; | 599 | p.which = which; |
| 597 | p.bits = fb->bits; | 600 | p.bits = fb->bits; |
| @@ -600,9 +603,19 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o | |||
| 600 | p.h = fb->height; | 603 | p.h = fb->height; |
| 601 | p.dh = (period > 0 ? (p.y % period) : 0); | 604 | p.dh = (period > 0 ? (p.y % period) : 0); |
| 602 | p.h -= p.dh; | 605 | p.h -= p.dh; |
| 603 | /* Clip bitmap if too high. */ | 606 | |
| 604 | if (p.h > row->height) | 607 | /* Adjust y to the offset in the row to start drawing the bitmap. */ |
| 605 | p.h = row->height; | 608 | switch (fb->align) |
| 609 | { | ||
| 610 | case ALIGN_BITMAP_CENTER: | ||
| 611 | p.y += (row->height - p.h) / 2; | ||
| 612 | break; | ||
| 613 | case ALIGN_BITMAP_BOTTOM: | ||
| 614 | p.y += (row->visible_height - p.h); | ||
| 615 | break; | ||
| 616 | case ALIGN_BITMAP_TOP: | ||
| 617 | break; | ||
| 618 | } | ||
| 606 | 619 | ||
| 607 | p.face = FACE_FROM_ID (f, face_id); | 620 | p.face = FACE_FROM_ID (f, face_id); |
| 608 | 621 | ||
| @@ -618,6 +631,9 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o | |||
| 618 | /* Clear left fringe if no bitmap to draw or if bitmap doesn't fill | 631 | /* Clear left fringe if no bitmap to draw or if bitmap doesn't fill |
| 619 | the fringe. */ | 632 | the fringe. */ |
| 620 | p.bx = -1; | 633 | p.bx = -1; |
| 634 | header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 635 | p.by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); | ||
| 636 | p.ny = row->visible_height; | ||
| 621 | if (left_p) | 637 | if (left_p) |
| 622 | { | 638 | { |
| 623 | int wd = WINDOW_LEFT_FRINGE_WIDTH (w); | 639 | int wd = WINDOW_LEFT_FRINGE_WIDTH (w); |
| @@ -628,7 +644,7 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o | |||
| 628 | p.wd = wd; | 644 | p.wd = wd; |
| 629 | p.x = x - p.wd - (wd - p.wd) / 2; | 645 | p.x = x - p.wd - (wd - p.wd) / 2; |
| 630 | 646 | ||
| 631 | if (p.wd < wd || row->height > p.h) | 647 | if (p.wd < wd || p.y > p.by || p.y + p.h < p.by + p.ny) |
| 632 | { | 648 | { |
| 633 | /* If W has a vertical border to its left, don't draw over it. */ | 649 | /* If W has a vertical border to its left, don't draw over it. */ |
| 634 | wd -= ((!WINDOW_LEFTMOST_P (w) | 650 | wd -= ((!WINDOW_LEFTMOST_P (w) |
| @@ -650,35 +666,13 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o | |||
| 650 | p.x = x + (wd - p.wd) / 2; | 666 | p.x = x + (wd - p.wd) / 2; |
| 651 | /* Clear right fringe if no bitmap to draw of if bitmap doesn't fill | 667 | /* Clear right fringe if no bitmap to draw of if bitmap doesn't fill |
| 652 | the fringe. */ | 668 | the fringe. */ |
| 653 | if (p.wd < wd || row->height > p.h) | 669 | if (p.wd < wd || p.y > p.by || p.y + p.h < p.by + p.ny) |
| 654 | { | 670 | { |
| 655 | p.bx = x; | 671 | p.bx = x; |
| 656 | p.nx = wd; | 672 | p.nx = wd; |
| 657 | } | 673 | } |
| 658 | } | 674 | } |
| 659 | 675 | ||
| 660 | if (p.bx >= 0) | ||
| 661 | { | ||
| 662 | int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 663 | |||
| 664 | p.by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); | ||
| 665 | p.ny = row->visible_height; | ||
| 666 | } | ||
| 667 | |||
| 668 | /* Adjust y to the offset in the row to start drawing the bitmap. */ | ||
| 669 | switch (fb->align) | ||
| 670 | { | ||
| 671 | case ALIGN_BITMAP_CENTER: | ||
| 672 | p.y += (row->height - p.h) / 2; | ||
| 673 | break; | ||
| 674 | case ALIGN_BITMAP_BOTTOM: | ||
| 675 | p.h = fb->height; | ||
| 676 | p.y += (row->visible_height - p.h); | ||
| 677 | break; | ||
| 678 | case ALIGN_BITMAP_TOP: | ||
| 679 | break; | ||
| 680 | } | ||
| 681 | |||
| 682 | FRAME_RIF (f)->draw_fringe_bitmap (w, row, &p); | 676 | FRAME_RIF (f)->draw_fringe_bitmap (w, row, &p); |
| 683 | } | 677 | } |
| 684 | 678 | ||
| @@ -892,7 +886,7 @@ draw_window_fringes (struct window *w, int no_fringe) | |||
| 892 | struct glyph_row *row; | 886 | struct glyph_row *row; |
| 893 | int yb = window_text_bottom_y (w); | 887 | int yb = window_text_bottom_y (w); |
| 894 | int nrows = w->current_matrix->nrows; | 888 | int nrows = w->current_matrix->nrows; |
| 895 | int y = 0, rn; | 889 | int y, rn; |
| 896 | int updated = 0; | 890 | int updated = 0; |
| 897 | 891 | ||
| 898 | if (w->pseudo_window_p) | 892 | if (w->pseudo_window_p) |
| @@ -904,7 +898,7 @@ draw_window_fringes (struct window *w, int no_fringe) | |||
| 904 | || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0)) | 898 | || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0)) |
| 905 | updated++; | 899 | updated++; |
| 906 | 900 | ||
| 907 | for (y = 0, rn = 0, row = w->current_matrix->rows; | 901 | for (y = w->vscroll, rn = 0, row = w->current_matrix->rows; |
| 908 | y < yb && rn < nrows; | 902 | y < yb && rn < nrows; |
| 909 | y += row->height, ++row, ++rn) | 903 | y += row->height, ++row, ++rn) |
| 910 | { | 904 | { |
| @@ -938,6 +932,9 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 938 | Lisp_Object ind = Qnil; | 932 | Lisp_Object ind = Qnil; |
| 939 | #define MAX_BITMAP_CACHE (8*4) | 933 | #define MAX_BITMAP_CACHE (8*4) |
| 940 | int bitmap_cache[MAX_BITMAP_CACHE]; | 934 | int bitmap_cache[MAX_BITMAP_CACHE]; |
| 935 | int top_ind_rn, bot_ind_rn; | ||
| 936 | int top_ind_min_y, bot_ind_max_y; | ||
| 937 | int top_row_ends_at_zv_p, bot_row_ends_at_zv_p; | ||
| 941 | 938 | ||
| 942 | if (w->pseudo_window_p) | 939 | if (w->pseudo_window_p) |
| 943 | return 0; | 940 | return 0; |
| @@ -966,11 +963,10 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 966 | boundary_top = boundary_bot = Qleft; | 963 | boundary_top = boundary_bot = Qleft; |
| 967 | } | 964 | } |
| 968 | 965 | ||
| 966 | top_ind_rn = bot_ind_rn = -1; | ||
| 969 | if (!NILP (ind)) | 967 | if (!NILP (ind)) |
| 970 | { | 968 | { |
| 971 | int done_top = 0, done_bot = 0; | 969 | for (y = w->vscroll, rn = 0; |
| 972 | |||
| 973 | for (y = 0, rn = 0; | ||
| 974 | y < yb && rn < nrows; | 970 | y < yb && rn < nrows; |
| 975 | y += row->height, ++rn) | 971 | y += row->height, ++rn) |
| 976 | { | 972 | { |
| @@ -991,31 +987,25 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 991 | 987 | ||
| 992 | if (!row->mode_line_p) | 988 | if (!row->mode_line_p) |
| 993 | { | 989 | { |
| 994 | if (!done_top) | 990 | if (top_ind_rn < 0 && row->visible_height > 0) |
| 995 | { | 991 | { |
| 996 | if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)) | 992 | if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)) |
| 997 | && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row)) | 993 | && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row)) |
| 998 | row->indicate_bob_p = !NILP (boundary_top); | 994 | row->indicate_bob_p = !NILP (boundary_top); |
| 999 | else | 995 | else |
| 1000 | row->indicate_top_line_p = !NILP (arrow_top); | 996 | row->indicate_top_line_p = !NILP (arrow_top); |
| 1001 | done_top = 1; | 997 | top_ind_rn = rn; |
| 1002 | } | 998 | } |
| 1003 | 999 | ||
| 1004 | if (!done_bot) | 1000 | if (bot_ind_rn < 0) |
| 1005 | { | 1001 | { |
| 1006 | if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)) | 1002 | if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)) |
| 1007 | && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row)) | 1003 | && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row)) |
| 1008 | row->indicate_eob_p = !NILP (boundary_bot), done_bot = 1; | 1004 | row->indicate_eob_p = !NILP (boundary_bot), bot_ind_rn = rn; |
| 1009 | else if (y + row->height >= yb) | 1005 | else if (y + row->height >= yb) |
| 1010 | row->indicate_bottom_line_p = !NILP (arrow_bot), done_bot = 1; | 1006 | row->indicate_bottom_line_p = !NILP (arrow_bot), bot_ind_rn = rn; |
| 1011 | } | 1007 | } |
| 1012 | } | 1008 | } |
| 1013 | |||
| 1014 | if (indicate_bob_p != row->indicate_bob_p | ||
| 1015 | || indicate_top_line_p != row->indicate_top_line_p | ||
| 1016 | || indicate_eob_p != row->indicate_eob_p | ||
| 1017 | || indicate_bottom_line_p != row->indicate_bottom_line_p) | ||
| 1018 | row->redraw_fringe_bitmaps_p = 1; | ||
| 1019 | } | 1009 | } |
| 1020 | } | 1010 | } |
| 1021 | 1011 | ||
| @@ -1039,12 +1029,139 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 1039 | get_logical_fringe_bitmap (w, which, 1, partial_p))) | 1029 | get_logical_fringe_bitmap (w, which, 1, partial_p))) |
| 1040 | 1030 | ||
| 1041 | 1031 | ||
| 1042 | for (y = 0, rn = 0; | 1032 | /* Extend top-aligned top indicator (or bottom-aligned bottom |
| 1033 | indicator) to adjacent rows if it doesn't fit in one row. */ | ||
| 1034 | top_ind_min_y = bot_ind_max_y = -1; | ||
| 1035 | if (top_ind_rn >= 0) | ||
| 1036 | { | ||
| 1037 | int bn = NO_FRINGE_BITMAP; | ||
| 1038 | |||
| 1039 | row = w->desired_matrix->rows + top_ind_rn; | ||
| 1040 | if (!row->enabled_p) | ||
| 1041 | row = w->current_matrix->rows + top_ind_rn; | ||
| 1042 | |||
| 1043 | top_row_ends_at_zv_p = row->ends_at_zv_p; | ||
| 1044 | if (row->indicate_bob_p) | ||
| 1045 | { | ||
| 1046 | if (EQ (boundary_top, Qleft)) | ||
| 1047 | bn = ((row->indicate_eob_p && EQ (boundary_bot, Qleft)) | ||
| 1048 | ? LEFT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p) | ||
| 1049 | : LEFT_FRINGE (2, Qtop, 0)); | ||
| 1050 | else | ||
| 1051 | bn = ((row->indicate_eob_p && EQ (boundary_bot, Qright)) | ||
| 1052 | ? RIGHT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p) | ||
| 1053 | : RIGHT_FRINGE (2, Qtop, 0)); | ||
| 1054 | } | ||
| 1055 | else if (row->indicate_top_line_p) | ||
| 1056 | { | ||
| 1057 | if (EQ (arrow_top, Qleft)) | ||
| 1058 | bn = LEFT_FRINGE (6, Qup, 0); | ||
| 1059 | else | ||
| 1060 | bn = RIGHT_FRINGE (6, Qup, 0); | ||
| 1061 | } | ||
| 1062 | |||
| 1063 | if (bn != NO_FRINGE_BITMAP) | ||
| 1064 | { | ||
| 1065 | struct fringe_bitmap *fb; | ||
| 1066 | |||
| 1067 | fb = fringe_bitmaps[bn]; | ||
| 1068 | if (fb == NULL) | ||
| 1069 | fb = &standard_bitmaps[bn < MAX_STANDARD_FRINGE_BITMAPS | ||
| 1070 | ? bn : UNDEF_FRINGE_BITMAP]; | ||
| 1071 | if (fb->align == ALIGN_BITMAP_TOP && fb->period == 0) | ||
| 1072 | { | ||
| 1073 | struct glyph_row *row1; | ||
| 1074 | int top_ind_max_y; | ||
| 1075 | |||
| 1076 | top_ind_min_y = WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 1077 | top_ind_max_y = top_ind_min_y + fb->height; | ||
| 1078 | if (top_ind_max_y > yb) | ||
| 1079 | top_ind_max_y = yb; | ||
| 1080 | |||
| 1081 | for (y = row->y + row->height, rn = top_ind_rn + 1; | ||
| 1082 | y < top_ind_max_y && rn < nrows; | ||
| 1083 | y += row1->height, rn++) | ||
| 1084 | { | ||
| 1085 | if (bot_ind_rn >= 0 && rn >= bot_ind_rn) | ||
| 1086 | break; | ||
| 1087 | |||
| 1088 | row1 = w->desired_matrix->rows + rn; | ||
| 1089 | if (!row1->enabled_p) | ||
| 1090 | row1 = w->current_matrix->rows + rn; | ||
| 1091 | |||
| 1092 | row1->indicate_bob_p = row->indicate_bob_p; | ||
| 1093 | row1->indicate_top_line_p = row->indicate_top_line_p; | ||
| 1094 | } | ||
| 1095 | } | ||
| 1096 | } | ||
| 1097 | } | ||
| 1098 | if (bot_ind_rn >= 0) | ||
| 1099 | { | ||
| 1100 | int bn = NO_FRINGE_BITMAP; | ||
| 1101 | |||
| 1102 | row = w->desired_matrix->rows + bot_ind_rn; | ||
| 1103 | if (!row->enabled_p) | ||
| 1104 | row = w->current_matrix->rows + bot_ind_rn; | ||
| 1105 | |||
| 1106 | bot_row_ends_at_zv_p = row->ends_at_zv_p; | ||
| 1107 | if (row->indicate_eob_p) | ||
| 1108 | { | ||
| 1109 | if (EQ (boundary_bot, Qleft)) | ||
| 1110 | bn = LEFT_FRINGE (3, Qbottom, row->ends_at_zv_p); | ||
| 1111 | else | ||
| 1112 | bn = RIGHT_FRINGE (3, Qbottom, row->ends_at_zv_p); | ||
| 1113 | } | ||
| 1114 | else if (row->indicate_bottom_line_p) | ||
| 1115 | { | ||
| 1116 | if (EQ (arrow_bot, Qleft)) | ||
| 1117 | bn = LEFT_FRINGE (7, Qdown, 0); | ||
| 1118 | else | ||
| 1119 | bn = RIGHT_FRINGE (7, Qdown, 0); | ||
| 1120 | } | ||
| 1121 | |||
| 1122 | if (bn != NO_FRINGE_BITMAP) | ||
| 1123 | { | ||
| 1124 | struct fringe_bitmap *fb; | ||
| 1125 | |||
| 1126 | fb = fringe_bitmaps[bn]; | ||
| 1127 | if (fb == NULL) | ||
| 1128 | fb = &standard_bitmaps[bn < MAX_STANDARD_FRINGE_BITMAPS | ||
| 1129 | ? bn : UNDEF_FRINGE_BITMAP]; | ||
| 1130 | if (fb->align == ALIGN_BITMAP_BOTTOM && fb->period == 0) | ||
| 1131 | { | ||
| 1132 | struct glyph_row *row1; | ||
| 1133 | int bot_ind_min_y; | ||
| 1134 | |||
| 1135 | bot_ind_max_y = row->y + row->visible_height; | ||
| 1136 | bot_ind_min_y = bot_ind_max_y - fb->height; | ||
| 1137 | if (bot_ind_min_y < WINDOW_HEADER_LINE_HEIGHT (w)) | ||
| 1138 | bot_ind_min_y = WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 1139 | |||
| 1140 | for (y = row->y, rn = bot_ind_rn - 1; | ||
| 1141 | y >= bot_ind_min_y && rn >= 0; | ||
| 1142 | y -= row1->height, rn--) | ||
| 1143 | { | ||
| 1144 | if (top_ind_rn >= 0 && rn <= top_ind_rn) | ||
| 1145 | break; | ||
| 1146 | |||
| 1147 | row1 = w->desired_matrix->rows + rn; | ||
| 1148 | if (!row1->enabled_p) | ||
| 1149 | row1 = w->current_matrix->rows + rn; | ||
| 1150 | |||
| 1151 | row1->indicate_eob_p = row->indicate_eob_p; | ||
| 1152 | row1->indicate_bottom_line_p = row->indicate_bottom_line_p; | ||
| 1153 | } | ||
| 1154 | } | ||
| 1155 | } | ||
| 1156 | } | ||
| 1157 | |||
| 1158 | for (y = w->vscroll, rn = 0; | ||
| 1043 | y < yb && rn < nrows; | 1159 | y < yb && rn < nrows; |
| 1044 | y += row->height, rn++) | 1160 | y += row->height, rn++) |
| 1045 | { | 1161 | { |
| 1046 | int left, right; | 1162 | int left, right; |
| 1047 | unsigned left_face_id, right_face_id; | 1163 | unsigned left_face_id, right_face_id; |
| 1164 | int left_offset, right_offset; | ||
| 1048 | 1165 | ||
| 1049 | row = w->desired_matrix->rows + rn; | 1166 | row = w->desired_matrix->rows + rn; |
| 1050 | cur = w->current_matrix->rows + rn; | 1167 | cur = w->current_matrix->rows + rn; |
| @@ -1052,6 +1169,7 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 1052 | row = cur; | 1169 | row = cur; |
| 1053 | 1170 | ||
| 1054 | left_face_id = right_face_id = DEFAULT_FACE_ID; | 1171 | left_face_id = right_face_id = DEFAULT_FACE_ID; |
| 1172 | left_offset = right_offset = 0; | ||
| 1055 | 1173 | ||
| 1056 | /* Decide which bitmap to draw in the left fringe. */ | 1174 | /* Decide which bitmap to draw in the left fringe. */ |
| 1057 | if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) | 1175 | if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) |
| @@ -1065,20 +1183,35 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 1065 | || (row->reversed_p && row->truncated_on_right_p)) | 1183 | || (row->reversed_p && row->truncated_on_right_p)) |
| 1066 | left = LEFT_FRINGE(0, Qtruncation, 0); | 1184 | left = LEFT_FRINGE(0, Qtruncation, 0); |
| 1067 | else if (row->indicate_bob_p && EQ (boundary_top, Qleft)) | 1185 | else if (row->indicate_bob_p && EQ (boundary_top, Qleft)) |
| 1068 | left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft)) | 1186 | { |
| 1069 | ? LEFT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p) | 1187 | left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft)) |
| 1070 | : LEFT_FRINGE (2, Qtop, 0)); | 1188 | ? LEFT_FRINGE (1, Qtop_bottom, top_row_ends_at_zv_p) |
| 1189 | : LEFT_FRINGE (2, Qtop, 0)); | ||
| 1190 | if (top_ind_min_y >= 0) | ||
| 1191 | left_offset = top_ind_min_y - row->y; | ||
| 1192 | } | ||
| 1071 | else if (row->indicate_eob_p && EQ (boundary_bot, Qleft)) | 1193 | else if (row->indicate_eob_p && EQ (boundary_bot, Qleft)) |
| 1072 | left = LEFT_FRINGE (3, Qbottom, row->ends_at_zv_p); | 1194 | { |
| 1073 | else if ((!row->reversed_p && MATRIX_ROW_CONTINUATION_LINE_P (row)) | 1195 | left = LEFT_FRINGE (3, Qbottom, bot_row_ends_at_zv_p); |
| 1074 | || (row->reversed_p && row->continued_p)) | 1196 | if (bot_ind_max_y >= 0) |
| 1197 | left_offset = bot_ind_max_y - (row->y + row->visible_height); | ||
| 1198 | } | ||
| 1199 | else if (MATRIX_ROW_CONTINUATION_LINE_P (row)) | ||
| 1075 | left = LEFT_FRINGE (4, Qcontinuation, 0); | 1200 | left = LEFT_FRINGE (4, Qcontinuation, 0); |
| 1076 | else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft)) | 1201 | else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft)) |
| 1077 | left = LEFT_FRINGE (5, Qempty_line, 0); | 1202 | left = LEFT_FRINGE (5, Qempty_line, 0); |
| 1078 | else if (row->indicate_top_line_p && EQ (arrow_top, Qleft)) | 1203 | else if (row->indicate_top_line_p && EQ (arrow_top, Qleft)) |
| 1079 | left = LEFT_FRINGE (6, Qup, 0); | 1204 | { |
| 1205 | left = LEFT_FRINGE (6, Qup, 0); | ||
| 1206 | if (top_ind_min_y >= 0) | ||
| 1207 | left_offset = top_ind_min_y - row->y; | ||
| 1208 | } | ||
| 1080 | else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qleft)) | 1209 | else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qleft)) |
| 1081 | left = LEFT_FRINGE (7, Qdown, 0); | 1210 | { |
| 1211 | left = LEFT_FRINGE (7, Qdown, 0); | ||
| 1212 | if (bot_ind_max_y >= 0) | ||
| 1213 | left_offset = bot_ind_max_y - (row->y + row->visible_height); | ||
| 1214 | } | ||
| 1082 | else | 1215 | else |
| 1083 | left = NO_FRINGE_BITMAP; | 1216 | left = NO_FRINGE_BITMAP; |
| 1084 | 1217 | ||
| @@ -1094,18 +1227,33 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 1094 | || (row->reversed_p && row->truncated_on_left_p)) | 1227 | || (row->reversed_p && row->truncated_on_left_p)) |
| 1095 | right = RIGHT_FRINGE (0, Qtruncation, 0); | 1228 | right = RIGHT_FRINGE (0, Qtruncation, 0); |
| 1096 | else if (row->indicate_bob_p && EQ (boundary_top, Qright)) | 1229 | else if (row->indicate_bob_p && EQ (boundary_top, Qright)) |
| 1097 | right = ((row->indicate_eob_p && EQ (boundary_bot, Qright)) | 1230 | { |
| 1098 | ? RIGHT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p) | 1231 | right = ((row->indicate_eob_p && EQ (boundary_bot, Qright)) |
| 1099 | : RIGHT_FRINGE (2, Qtop, 0)); | 1232 | ? RIGHT_FRINGE (1, Qtop_bottom, top_row_ends_at_zv_p) |
| 1233 | : RIGHT_FRINGE (2, Qtop, 0)); | ||
| 1234 | if (top_ind_min_y >= 0) | ||
| 1235 | right_offset = top_ind_min_y - row->y; | ||
| 1236 | } | ||
| 1100 | else if (row->indicate_eob_p && EQ (boundary_bot, Qright)) | 1237 | else if (row->indicate_eob_p && EQ (boundary_bot, Qright)) |
| 1101 | right = RIGHT_FRINGE (3, Qbottom, row->ends_at_zv_p); | 1238 | { |
| 1102 | else if ((!row->reversed_p && row->continued_p) | 1239 | right = RIGHT_FRINGE (3, Qbottom, bot_row_ends_at_zv_p); |
| 1103 | || (row->reversed_p && MATRIX_ROW_CONTINUATION_LINE_P (row))) | 1240 | if (bot_ind_max_y >= 0) |
| 1241 | right_offset = bot_ind_max_y - (row->y + row->visible_height); | ||
| 1242 | } | ||
| 1243 | else if (row->continued_p) | ||
| 1104 | right = RIGHT_FRINGE (4, Qcontinuation, 0); | 1244 | right = RIGHT_FRINGE (4, Qcontinuation, 0); |
| 1105 | else if (row->indicate_top_line_p && EQ (arrow_top, Qright)) | 1245 | else if (row->indicate_top_line_p && EQ (arrow_top, Qright)) |
| 1106 | right = RIGHT_FRINGE (6, Qup, 0); | 1246 | { |
| 1247 | right = RIGHT_FRINGE (6, Qup, 0); | ||
| 1248 | if (top_ind_min_y >= 0) | ||
| 1249 | right_offset = top_ind_min_y - row->y; | ||
| 1250 | } | ||
| 1107 | else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qright)) | 1251 | else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qright)) |
| 1108 | right = RIGHT_FRINGE (7, Qdown, 0); | 1252 | { |
| 1253 | right = RIGHT_FRINGE (7, Qdown, 0); | ||
| 1254 | if (bot_ind_max_y >= 0) | ||
| 1255 | right_offset = bot_ind_max_y - (row->y + row->visible_height); | ||
| 1256 | } | ||
| 1109 | else if (row->indicate_empty_line_p && EQ (empty_pos, Qright)) | 1257 | else if (row->indicate_empty_line_p && EQ (empty_pos, Qright)) |
| 1110 | right = RIGHT_FRINGE (5, Qempty_line, 0); | 1258 | right = RIGHT_FRINGE (5, Qempty_line, 0); |
| 1111 | else | 1259 | else |
| @@ -1118,6 +1266,8 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 1118 | || right != cur->right_fringe_bitmap | 1266 | || right != cur->right_fringe_bitmap |
| 1119 | || left_face_id != cur->left_fringe_face_id | 1267 | || left_face_id != cur->left_fringe_face_id |
| 1120 | || right_face_id != cur->right_fringe_face_id | 1268 | || right_face_id != cur->right_fringe_face_id |
| 1269 | || left_offset != cur->left_fringe_offset | ||
| 1270 | || right_offset != cur->right_fringe_offset | ||
| 1121 | || cur->redraw_fringe_bitmaps_p) | 1271 | || cur->redraw_fringe_bitmaps_p) |
| 1122 | { | 1272 | { |
| 1123 | redraw_p = row->redraw_fringe_bitmaps_p = 1; | 1273 | redraw_p = row->redraw_fringe_bitmaps_p = 1; |
| @@ -1128,6 +1278,8 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 1128 | cur->right_fringe_bitmap = right; | 1278 | cur->right_fringe_bitmap = right; |
| 1129 | cur->left_fringe_face_id = left_face_id; | 1279 | cur->left_fringe_face_id = left_face_id; |
| 1130 | cur->right_fringe_face_id = right_face_id; | 1280 | cur->right_fringe_face_id = right_face_id; |
| 1281 | cur->left_fringe_offset = left_offset; | ||
| 1282 | cur->right_fringe_offset = right_offset; | ||
| 1131 | } | 1283 | } |
| 1132 | } | 1284 | } |
| 1133 | 1285 | ||
| @@ -1144,9 +1296,8 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 1144 | row->right_fringe_bitmap = right; | 1296 | row->right_fringe_bitmap = right; |
| 1145 | row->left_fringe_face_id = left_face_id; | 1297 | row->left_fringe_face_id = left_face_id; |
| 1146 | row->right_fringe_face_id = right_face_id; | 1298 | row->right_fringe_face_id = right_face_id; |
| 1147 | 1299 | row->left_fringe_offset = left_offset; | |
| 1148 | if (rn > 0 && row->redraw_fringe_bitmaps_p) | 1300 | row->right_fringe_offset = right_offset; |
| 1149 | row[-1].redraw_fringe_bitmaps_p = cur[-1].redraw_fringe_bitmaps_p = 1; | ||
| 1150 | } | 1301 | } |
| 1151 | 1302 | ||
| 1152 | return redraw_p && !keep_current_p; | 1303 | return redraw_p && !keep_current_p; |
diff --git a/src/image.c b/src/image.c index 064278eebbc..6e75921414b 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1053,6 +1053,10 @@ free_image (struct frame *f, struct image *img) | |||
| 1053 | /* Free resources, then free IMG. */ | 1053 | /* Free resources, then free IMG. */ |
| 1054 | img->type->free (f, img); | 1054 | img->type->free (f, img); |
| 1055 | xfree (img); | 1055 | xfree (img); |
| 1056 | |||
| 1057 | /* As display glyphs may still be referring to the image ID, we | ||
| 1058 | must garbage the frame (Bug#6426). */ | ||
| 1059 | SET_FRAME_GARBAGED (f); | ||
| 1056 | } | 1060 | } |
| 1057 | } | 1061 | } |
| 1058 | 1062 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index 6ea0b90b9b4..cddf04788a6 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -42,7 +42,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 42 | #include "puresize.h" | 42 | #include "puresize.h" |
| 43 | #include "systime.h" | 43 | #include "systime.h" |
| 44 | #include "atimer.h" | 44 | #include "atimer.h" |
| 45 | #include <setjmp.h> | ||
| 46 | #include <errno.h> | 45 | #include <errno.h> |
| 47 | 46 | ||
| 48 | #ifdef HAVE_GTK_AND_PTHREAD | 47 | #ifdef HAVE_GTK_AND_PTHREAD |
| @@ -9000,48 +8999,48 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9000 | int dont_downcase_last, int can_return_switch_frame, | 8999 | int dont_downcase_last, int can_return_switch_frame, |
| 9001 | int fix_current_buffer) | 9000 | int fix_current_buffer) |
| 9002 | { | 9001 | { |
| 9003 | volatile Lisp_Object from_string; | 9002 | Lisp_Object from_string; |
| 9004 | volatile int count = SPECPDL_INDEX (); | 9003 | int count = SPECPDL_INDEX (); |
| 9005 | 9004 | ||
| 9006 | /* How many keys there are in the current key sequence. */ | 9005 | /* How many keys there are in the current key sequence. */ |
| 9007 | volatile int t; | 9006 | int t; |
| 9008 | 9007 | ||
| 9009 | /* The length of the echo buffer when we started reading, and | 9008 | /* The length of the echo buffer when we started reading, and |
| 9010 | the length of this_command_keys when we started reading. */ | 9009 | the length of this_command_keys when we started reading. */ |
| 9011 | volatile int echo_start; | 9010 | int echo_start; |
| 9012 | volatile int keys_start; | 9011 | int keys_start; |
| 9013 | 9012 | ||
| 9014 | /* The number of keymaps we're scanning right now, and the number of | 9013 | /* The number of keymaps we're scanning right now, and the number of |
| 9015 | keymaps we have allocated space for. */ | 9014 | keymaps we have allocated space for. */ |
| 9016 | volatile int nmaps; | 9015 | int nmaps; |
| 9017 | volatile int nmaps_allocated = 0; | 9016 | int nmaps_allocated = 0; |
| 9018 | 9017 | ||
| 9019 | /* defs[0..nmaps-1] are the definitions of KEYBUF[0..t-1] in | 9018 | /* defs[0..nmaps-1] are the definitions of KEYBUF[0..t-1] in |
| 9020 | the current keymaps. */ | 9019 | the current keymaps. */ |
| 9021 | Lisp_Object *volatile defs = NULL; | 9020 | Lisp_Object *defs = NULL; |
| 9022 | 9021 | ||
| 9023 | /* submaps[0..nmaps-1] are the prefix definitions of KEYBUF[0..t-1] | 9022 | /* submaps[0..nmaps-1] are the prefix definitions of KEYBUF[0..t-1] |
| 9024 | in the current keymaps, or nil where it is not a prefix. */ | 9023 | in the current keymaps, or nil where it is not a prefix. */ |
| 9025 | Lisp_Object *volatile submaps = NULL; | 9024 | Lisp_Object *submaps = NULL; |
| 9026 | 9025 | ||
| 9027 | /* The local map to start out with at start of key sequence. */ | 9026 | /* The local map to start out with at start of key sequence. */ |
| 9028 | volatile Lisp_Object orig_local_map; | 9027 | Lisp_Object orig_local_map; |
| 9029 | 9028 | ||
| 9030 | /* The map from the `keymap' property to start out with at start of | 9029 | /* The map from the `keymap' property to start out with at start of |
| 9031 | key sequence. */ | 9030 | key sequence. */ |
| 9032 | volatile Lisp_Object orig_keymap; | 9031 | Lisp_Object orig_keymap; |
| 9033 | 9032 | ||
| 9034 | /* 1 if we have already considered switching to the local-map property | 9033 | /* 1 if we have already considered switching to the local-map property |
| 9035 | of the place where a mouse click occurred. */ | 9034 | of the place where a mouse click occurred. */ |
| 9036 | volatile int localized_local_map = 0; | 9035 | int localized_local_map = 0; |
| 9037 | 9036 | ||
| 9038 | /* The index in submaps[] of the first keymap that has a binding for | 9037 | /* The index in submaps[] of the first keymap that has a binding for |
| 9039 | this key sequence. In other words, the lowest i such that | 9038 | this key sequence. In other words, the lowest i such that |
| 9040 | submaps[i] is non-nil. */ | 9039 | submaps[i] is non-nil. */ |
| 9041 | volatile int first_binding; | 9040 | int first_binding; |
| 9042 | /* Index of the first key that has no binding. | 9041 | /* Index of the first key that has no binding. |
| 9043 | It is useless to try fkey.start larger than that. */ | 9042 | It is useless to try fkey.start larger than that. */ |
| 9044 | volatile int first_unbound; | 9043 | int first_unbound; |
| 9045 | 9044 | ||
| 9046 | /* If t < mock_input, then KEYBUF[t] should be read as the next | 9045 | /* If t < mock_input, then KEYBUF[t] should be read as the next |
| 9047 | input key. | 9046 | input key. |
| @@ -9056,7 +9055,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9056 | restart_sequence; the loop will read keys from keybuf up until | 9055 | restart_sequence; the loop will read keys from keybuf up until |
| 9057 | mock_input, thus rebuilding the state; and then it will resume | 9056 | mock_input, thus rebuilding the state; and then it will resume |
| 9058 | reading characters from the keyboard. */ | 9057 | reading characters from the keyboard. */ |
| 9059 | volatile int mock_input = 0; | 9058 | int mock_input = 0; |
| 9060 | 9059 | ||
| 9061 | /* If the sequence is unbound in submaps[], then | 9060 | /* If the sequence is unbound in submaps[], then |
| 9062 | keybuf[fkey.start..fkey.end-1] is a prefix in Vfunction_key_map, | 9061 | keybuf[fkey.start..fkey.end-1] is a prefix in Vfunction_key_map, |
| @@ -9066,28 +9065,28 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9066 | should hold off until t reaches them. We do this when we've just | 9065 | should hold off until t reaches them. We do this when we've just |
| 9067 | recognized a function key, to avoid searching for the function | 9066 | recognized a function key, to avoid searching for the function |
| 9068 | key's again in Vfunction_key_map. */ | 9067 | key's again in Vfunction_key_map. */ |
| 9069 | volatile keyremap fkey; | 9068 | keyremap fkey; |
| 9070 | 9069 | ||
| 9071 | /* Likewise, for key_translation_map and input-decode-map. */ | 9070 | /* Likewise, for key_translation_map and input-decode-map. */ |
| 9072 | volatile keyremap keytran, indec; | 9071 | keyremap keytran, indec; |
| 9073 | 9072 | ||
| 9074 | /* Non-zero if we are trying to map a key by changing an upper-case | 9073 | /* Non-zero if we are trying to map a key by changing an upper-case |
| 9075 | letter to lower case, or a shifted function key to an unshifted | 9074 | letter to lower case, or a shifted function key to an unshifted |
| 9076 | one. */ | 9075 | one. */ |
| 9077 | volatile int shift_translated = 0; | 9076 | int shift_translated = 0; |
| 9078 | 9077 | ||
| 9079 | /* If we receive a `switch-frame' or `select-window' event in the middle of | 9078 | /* If we receive a `switch-frame' or `select-window' event in the middle of |
| 9080 | a key sequence, we put it off for later. | 9079 | a key sequence, we put it off for later. |
| 9081 | While we're reading, we keep the event here. */ | 9080 | While we're reading, we keep the event here. */ |
| 9082 | volatile Lisp_Object delayed_switch_frame; | 9081 | Lisp_Object delayed_switch_frame; |
| 9083 | 9082 | ||
| 9084 | /* See the comment below... */ | 9083 | /* See the comment below... */ |
| 9085 | #if defined (GOBBLE_FIRST_EVENT) | 9084 | #if defined (GOBBLE_FIRST_EVENT) |
| 9086 | Lisp_Object first_event; | 9085 | Lisp_Object first_event; |
| 9087 | #endif | 9086 | #endif |
| 9088 | 9087 | ||
| 9089 | volatile Lisp_Object original_uppercase; | 9088 | Lisp_Object original_uppercase; |
| 9090 | volatile int original_uppercase_position = -1; | 9089 | int original_uppercase_position = -1; |
| 9091 | 9090 | ||
| 9092 | /* Gets around Microsoft compiler limitations. */ | 9091 | /* Gets around Microsoft compiler limitations. */ |
| 9093 | int dummyflag = 0; | 9092 | int dummyflag = 0; |
| @@ -9095,7 +9094,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9095 | struct buffer *starting_buffer; | 9094 | struct buffer *starting_buffer; |
| 9096 | 9095 | ||
| 9097 | /* List of events for which a fake prefix key has been generated. */ | 9096 | /* List of events for which a fake prefix key has been generated. */ |
| 9098 | volatile Lisp_Object fake_prefixed_keys = Qnil; | 9097 | Lisp_Object fake_prefixed_keys = Qnil; |
| 9099 | 9098 | ||
| 9100 | #if defined (GOBBLE_FIRST_EVENT) | 9099 | #if defined (GOBBLE_FIRST_EVENT) |
| 9101 | int junk; | 9100 | int junk; |
| @@ -9252,13 +9251,13 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9252 | (say, a mouse click on the mode line which is being treated | 9251 | (say, a mouse click on the mode line which is being treated |
| 9253 | as [mode-line (mouse-...)], then we backtrack to this point | 9252 | as [mode-line (mouse-...)], then we backtrack to this point |
| 9254 | of keybuf. */ | 9253 | of keybuf. */ |
| 9255 | volatile int last_real_key_start; | 9254 | int last_real_key_start; |
| 9256 | 9255 | ||
| 9257 | /* These variables are analogous to echo_start and keys_start; | 9256 | /* These variables are analogous to echo_start and keys_start; |
| 9258 | while those allow us to restart the entire key sequence, | 9257 | while those allow us to restart the entire key sequence, |
| 9259 | echo_local_start and keys_local_start allow us to throw away | 9258 | echo_local_start and keys_local_start allow us to throw away |
| 9260 | just one key. */ | 9259 | just one key. */ |
| 9261 | volatile int echo_local_start, keys_local_start, local_first_binding; | 9260 | int echo_local_start, keys_local_start, local_first_binding; |
| 9262 | 9261 | ||
| 9263 | eassert (indec.end == t || (indec.end > t && indec.end <= mock_input)); | 9262 | eassert (indec.end == t || (indec.end > t && indec.end <= mock_input)); |
| 9264 | eassert (indec.start <= indec.end); | 9263 | eassert (indec.start <= indec.end); |
diff --git a/src/keymap.c b/src/keymap.c index 1245caf3b9b..40005a51008 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1126,11 +1126,13 @@ DEFUN ("define-key", Fdefine_key, Sdefine_key, 3, 3, 0, | |||
| 1126 | doc: /* In KEYMAP, define key sequence KEY as DEF. | 1126 | doc: /* In KEYMAP, define key sequence KEY as DEF. |
| 1127 | KEYMAP is a keymap. | 1127 | KEYMAP is a keymap. |
| 1128 | 1128 | ||
| 1129 | KEY is a string or a vector of symbols and characters meaning a | 1129 | KEY is a string or a vector of symbols and characters, representing a |
| 1130 | sequence of keystrokes and events. Non-ASCII characters with codes | 1130 | sequence of keystrokes and events. Non-ASCII characters with codes |
| 1131 | above 127 (such as ISO Latin-1) can be included if you use a vector. | 1131 | above 127 (such as ISO Latin-1) can be represented by vectors. |
| 1132 | Using [t] for KEY creates a default definition, which applies to any | 1132 | Two types of vector have special meanings: |
| 1133 | event type that has no other definition in this keymap. | 1133 | [remap COMMAND] remaps any key binding for COMMAND. |
| 1134 | [t] creates a default definition, which applies to any event with no | ||
| 1135 | other definition in KEYMAP. | ||
| 1134 | 1136 | ||
| 1135 | DEF is anything that can be a key's definition: | 1137 | DEF is anything that can be a key's definition: |
| 1136 | nil (means key is undefined in this keymap), | 1138 | nil (means key is undefined in this keymap), |
diff --git a/src/lread.c b/src/lread.c index 42925f8ac09..c8c464875bf 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2316,28 +2316,28 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) | |||
| 2316 | /* This is repetitive but fast and simple. */ | 2316 | /* This is repetitive but fast and simple. */ |
| 2317 | params[param_count] = QCsize; | 2317 | params[param_count] = QCsize; |
| 2318 | params[param_count+1] = Fplist_get (tmp, Qsize); | 2318 | params[param_count+1] = Fplist_get (tmp, Qsize); |
| 2319 | if (!NILP (params[param_count+1])) | 2319 | if (!NILP (params[param_count + 1])) |
| 2320 | param_count+=2; | 2320 | param_count += 2; |
| 2321 | 2321 | ||
| 2322 | params[param_count] = QCtest; | 2322 | params[param_count] = QCtest; |
| 2323 | params[param_count+1] = Fplist_get (tmp, Qtest); | 2323 | params[param_count+1] = Fplist_get (tmp, Qtest); |
| 2324 | if (!NILP (params[param_count+1])) | 2324 | if (!NILP (params[param_count + 1])) |
| 2325 | param_count+=2; | 2325 | param_count += 2; |
| 2326 | 2326 | ||
| 2327 | params[param_count] = QCweakness; | 2327 | params[param_count] = QCweakness; |
| 2328 | params[param_count+1] = Fplist_get (tmp, Qweakness); | 2328 | params[param_count+1] = Fplist_get (tmp, Qweakness); |
| 2329 | if (!NILP (params[param_count+1])) | 2329 | if (!NILP (params[param_count + 1])) |
| 2330 | param_count+=2; | 2330 | param_count += 2; |
| 2331 | 2331 | ||
| 2332 | params[param_count] = QCrehash_size; | 2332 | params[param_count] = QCrehash_size; |
| 2333 | params[param_count+1] = Fplist_get (tmp, Qrehash_size); | 2333 | params[param_count+1] = Fplist_get (tmp, Qrehash_size); |
| 2334 | if (!NILP (params[param_count+1])) | 2334 | if (!NILP (params[param_count + 1])) |
| 2335 | param_count+=2; | 2335 | param_count += 2; |
| 2336 | 2336 | ||
| 2337 | params[param_count] = QCrehash_threshold; | 2337 | params[param_count] = QCrehash_threshold; |
| 2338 | params[param_count+1] = Fplist_get (tmp, Qrehash_threshold); | 2338 | params[param_count+1] = Fplist_get (tmp, Qrehash_threshold); |
| 2339 | if (!NILP (params[param_count+1])) | 2339 | if (!NILP (params[param_count + 1])) |
| 2340 | param_count+=2; | 2340 | param_count += 2; |
| 2341 | 2341 | ||
| 2342 | /* This is the hashtable data. */ | 2342 | /* This is the hashtable data. */ |
| 2343 | data = Fplist_get (tmp, Qdata); | 2343 | data = Fplist_get (tmp, Qdata); |
| @@ -2358,6 +2358,8 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) | |||
| 2358 | 2358 | ||
| 2359 | return ht; | 2359 | return ht; |
| 2360 | } | 2360 | } |
| 2361 | UNREAD (c); | ||
| 2362 | invalid_syntax ("#", 1); | ||
| 2361 | } | 2363 | } |
| 2362 | if (c == '^') | 2364 | if (c == '^') |
| 2363 | { | 2365 | { |
diff --git a/src/nsterm.m b/src/nsterm.m index 62f1c0bcd57..58245f4aebf 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -2177,20 +2177,7 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, | |||
| 2177 | 2177 | ||
| 2178 | /* Must clip because of partially visible lines. */ | 2178 | /* Must clip because of partially visible lines. */ |
| 2179 | rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); | 2179 | rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); |
| 2180 | if (p->y < rowY) | 2180 | ns_clip_to_row (w, row, -1, YES); |
| 2181 | { | ||
| 2182 | /* Adjust position of "bottom aligned" bitmap on partially | ||
| 2183 | visible last row. */ | ||
| 2184 | int oldY = row->y; | ||
| 2185 | int oldVH = row->visible_height; | ||
| 2186 | row->visible_height = p->h; | ||
| 2187 | row->y -= rowY - p->y; | ||
| 2188 | ns_clip_to_row (w, row, -1, NO); | ||
| 2189 | row->y = oldY; | ||
| 2190 | row->visible_height = oldVH; | ||
| 2191 | } | ||
| 2192 | else | ||
| 2193 | ns_clip_to_row (w, row, -1, YES); | ||
| 2194 | 2181 | ||
| 2195 | if (p->bx >= 0 && !p->overlay_p) | 2182 | if (p->bx >= 0 && !p->overlay_p) |
| 2196 | { | 2183 | { |
diff --git a/src/w32fns.c b/src/w32fns.c index 916aea28eea..c1791f2bf3e 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -288,10 +288,15 @@ unsigned int msh_mousewheel = 0; | |||
| 288 | #define MENU_FREE_DELAY 1000 | 288 | #define MENU_FREE_DELAY 1000 |
| 289 | static unsigned menu_free_timer = 0; | 289 | static unsigned menu_free_timer = 0; |
| 290 | 290 | ||
| 291 | /* In dispnew.c */ | ||
| 292 | |||
| 293 | extern Lisp_Object Vwindow_system_version; | ||
| 294 | |||
| 291 | /* The below are defined in frame.c. */ | 295 | /* The below are defined in frame.c. */ |
| 292 | 296 | ||
| 293 | extern Lisp_Object Vmenu_bar_mode, Vtool_bar_mode; | 297 | extern Lisp_Object Vmenu_bar_mode, Vtool_bar_mode; |
| 294 | extern Lisp_Object Vwindow_system_version; | 298 | extern Lisp_Object Vwindow_system_version; |
| 299 | extern Lisp_Object Qtooltip; | ||
| 295 | 300 | ||
| 296 | #ifdef GLYPH_DEBUG | 301 | #ifdef GLYPH_DEBUG |
| 297 | int image_cache_refcount, dpyinfo_refcount; | 302 | int image_cache_refcount, dpyinfo_refcount; |
| @@ -5476,9 +5481,8 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, | |||
| 5476 | change_frame_size (f, height, width, 1, 0, 0); | 5481 | change_frame_size (f, height, width, 1, 0, 0); |
| 5477 | 5482 | ||
| 5478 | /* Add `tooltip' frame parameter's default value. */ | 5483 | /* Add `tooltip' frame parameter's default value. */ |
| 5479 | if (NILP (Fframe_parameter (frame, intern ("tooltip")))) | 5484 | if (NILP (Fframe_parameter (frame, Qtooltip))) |
| 5480 | Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), | 5485 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qtooltip, Qt), Qnil)); |
| 5481 | Qnil)); | ||
| 5482 | 5486 | ||
| 5483 | /* Set up faces after all frame parameters are known. This call | 5487 | /* Set up faces after all frame parameters are known. This call |
| 5484 | also merges in face attributes specified for new frames. | 5488 | also merges in face attributes specified for new frames. |
diff --git a/src/w32term.c b/src/w32term.c index 7ace4b01f95..9db533eb5e9 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -737,7 +737,6 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row, | |||
| 737 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 737 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 738 | HDC hdc; | 738 | HDC hdc; |
| 739 | struct face *face = p->face; | 739 | struct face *face = p->face; |
| 740 | int rowY; | ||
| 741 | 740 | ||
| 742 | hdc = get_frame_dc (f); | 741 | hdc = get_frame_dc (f); |
| 743 | 742 | ||
| @@ -796,21 +795,7 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row, | |||
| 796 | } | 795 | } |
| 797 | 796 | ||
| 798 | /* Must clip because of partially visible lines. */ | 797 | /* Must clip because of partially visible lines. */ |
| 799 | rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); | 798 | w32_clip_to_row (w, row, -1, hdc); |
| 800 | if (p->y < rowY) | ||
| 801 | { | ||
| 802 | /* Adjust position of "bottom aligned" bitmap on partially | ||
| 803 | visible last row. */ | ||
| 804 | int oldY = row->y; | ||
| 805 | int oldVH = row->visible_height; | ||
| 806 | row->visible_height = p->h; | ||
| 807 | row->y -= rowY - p->y; | ||
| 808 | w32_clip_to_row (w, row, -1, hdc); | ||
| 809 | row->y = oldY; | ||
| 810 | row->visible_height = oldVH; | ||
| 811 | } | ||
| 812 | else | ||
| 813 | w32_clip_to_row (w, row, -1, hdc); | ||
| 814 | 799 | ||
| 815 | if (p->which && p->which < max_fringe_bmp) | 800 | if (p->which && p->which < max_fringe_bmp) |
| 816 | { | 801 | { |
diff --git a/src/xdisp.c b/src/xdisp.c index d145e7bd9f6..b6bd231bb67 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -6625,6 +6625,7 @@ static int | |||
| 6625 | next_element_from_image (struct it *it) | 6625 | next_element_from_image (struct it *it) |
| 6626 | { | 6626 | { |
| 6627 | it->what = IT_IMAGE; | 6627 | it->what = IT_IMAGE; |
| 6628 | it->ignore_overlay_strings_at_pos_p = 0; | ||
| 6628 | return 1; | 6629 | return 1; |
| 6629 | } | 6630 | } |
| 6630 | 6631 | ||
diff --git a/src/xfaces.c b/src/xfaces.c index 520546c42b1..6848e7f95dc 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -5605,6 +5605,7 @@ realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id) | |||
| 5605 | struct face *former_face = cache->faces_by_id[former_face_id]; | 5605 | struct face *former_face = cache->faces_by_id[former_face_id]; |
| 5606 | uncache_face (cache, former_face); | 5606 | uncache_face (cache, former_face); |
| 5607 | free_realized_face (cache->f, former_face); | 5607 | free_realized_face (cache->f, former_face); |
| 5608 | SET_FRAME_GARBAGED (cache->f); | ||
| 5608 | } | 5609 | } |
| 5609 | 5610 | ||
| 5610 | if (FRAME_WINDOW_P (cache->f)) | 5611 | if (FRAME_WINDOW_P (cache->f)) |
diff --git a/src/xfns.c b/src/xfns.c index 1dfaa381b3e..988725ead00 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -205,6 +205,7 @@ extern Lisp_Object Vsystem_name; | |||
| 205 | /* The below are defined in frame.c. */ | 205 | /* The below are defined in frame.c. */ |
| 206 | 206 | ||
| 207 | extern Lisp_Object Vmenu_bar_mode, Vtool_bar_mode; | 207 | extern Lisp_Object Vmenu_bar_mode, Vtool_bar_mode; |
| 208 | extern Lisp_Object Qtooltip; | ||
| 208 | 209 | ||
| 209 | #if GLYPH_DEBUG | 210 | #if GLYPH_DEBUG |
| 210 | int image_cache_refcount, dpyinfo_refcount; | 211 | int image_cache_refcount, dpyinfo_refcount; |
| @@ -4847,9 +4848,8 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms, Lisp_Obje | |||
| 4847 | change_frame_size (f, height, width, 1, 0, 0); | 4848 | change_frame_size (f, height, width, 1, 0, 0); |
| 4848 | 4849 | ||
| 4849 | /* Add `tooltip' frame parameter's default value. */ | 4850 | /* Add `tooltip' frame parameter's default value. */ |
| 4850 | if (NILP (Fframe_parameter (frame, intern ("tooltip")))) | 4851 | if (NILP (Fframe_parameter (frame, Qtooltip))) |
| 4851 | Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), | 4852 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qtooltip, Qt), Qnil)); |
| 4852 | Qnil)); | ||
| 4853 | 4853 | ||
| 4854 | /* FIXME - can this be done in a similar way to normal frames? | 4854 | /* FIXME - can this be done in a similar way to normal frames? |
| 4855 | http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */ | 4855 | http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */ |
diff --git a/src/xmenu.c b/src/xmenu.c index 8d79aed3744..93a40792aec 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -676,6 +676,14 @@ x_activate_menubar (FRAME_PTR f) | |||
| 676 | set_frame_menubar (f, 0, 1); | 676 | set_frame_menubar (f, 0, 1); |
| 677 | BLOCK_INPUT; | 677 | BLOCK_INPUT; |
| 678 | #ifdef USE_GTK | 678 | #ifdef USE_GTK |
| 679 | /* If we click outside any menu item, the menu bar still grabs. | ||
| 680 | So we send Press and the Release. If outside, grab is released. | ||
| 681 | If on a menu item, it is popped up normally. | ||
| 682 | PutBack is like a stack, so we put back in reverse order. */ | ||
| 683 | f->output_data.x->saved_menu_event->type = ButtonRelease; | ||
| 684 | XPutBackEvent (f->output_data.x->display_info->display, | ||
| 685 | f->output_data.x->saved_menu_event); | ||
| 686 | f->output_data.x->saved_menu_event->type = ButtonPress; | ||
| 679 | XPutBackEvent (f->output_data.x->display_info->display, | 687 | XPutBackEvent (f->output_data.x->display_info->display, |
| 680 | f->output_data.x->saved_menu_event); | 688 | f->output_data.x->saved_menu_event); |
| 681 | popup_activated_flag = 1; | 689 | popup_activated_flag = 1; |
diff --git a/src/xterm.c b/src/xterm.c index d1bf9eaa5ea..3ec0636fc60 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -753,24 +753,9 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring | |||
| 753 | Window window = FRAME_X_WINDOW (f); | 753 | Window window = FRAME_X_WINDOW (f); |
| 754 | GC gc = f->output_data.x->normal_gc; | 754 | GC gc = f->output_data.x->normal_gc; |
| 755 | struct face *face = p->face; | 755 | struct face *face = p->face; |
| 756 | int rowY; | ||
| 757 | 756 | ||
| 758 | /* Must clip because of partially visible lines. */ | 757 | /* Must clip because of partially visible lines. */ |
| 759 | rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); | 758 | x_clip_to_row (w, row, -1, gc); |
| 760 | if (p->y < rowY) | ||
| 761 | { | ||
| 762 | /* Adjust position of "bottom aligned" bitmap on partially | ||
| 763 | visible last row. */ | ||
| 764 | int oldY = row->y; | ||
| 765 | int oldVH = row->visible_height; | ||
| 766 | row->visible_height = p->h; | ||
| 767 | row->y -= rowY - p->y; | ||
| 768 | x_clip_to_row (w, row, -1, gc); | ||
| 769 | row->y = oldY; | ||
| 770 | row->visible_height = oldVH; | ||
| 771 | } | ||
| 772 | else | ||
| 773 | x_clip_to_row (w, row, -1, gc); | ||
| 774 | 759 | ||
| 775 | if (!p->overlay_p) | 760 | if (!p->overlay_p) |
| 776 | { | 761 | { |