Mercurial > emacs
comparison src/xterm.c @ 53888:57b27e42bf9e
(x_draw_fringe_bitmap): Handle overlayed fringe bitmaps.
Use cursor color for displaying cursor in fringe.
(x_redisplay_interface): Add null handlers for
define_fringe_bitmap and destroy_fringe_bitmap functions.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sun, 08 Feb 2004 23:21:19 +0000 |
parents | 1470a74d1913 |
children | 869ca316cdda |
comparison
equal
deleted
inserted
replaced
53887:ed7d265e860f | 53888:57b27e42bf9e |
---|---|
713 row->visible_height = oldVH; | 713 row->visible_height = oldVH; |
714 } | 714 } |
715 else | 715 else |
716 x_clip_to_row (w, row, gc); | 716 x_clip_to_row (w, row, gc); |
717 | 717 |
718 if (p->bx >= 0) | 718 if (p->bx >= 0 && !p->overlay_p) |
719 { | 719 { |
720 /* In case the same realized face is used for fringes and | 720 /* In case the same realized face is used for fringes and |
721 for something displayed in the text (e.g. face `region' on | 721 for something displayed in the text (e.g. face `region' on |
722 mono-displays, the fill style may have been changed to | 722 mono-displays, the fill style may have been changed to |
723 FillSolid in x_draw_glyph_string_background. */ | 723 FillSolid in x_draw_glyph_string_background. */ |
731 | 731 |
732 if (!face->stipple) | 732 if (!face->stipple) |
733 XSetForeground (display, face->gc, face->foreground); | 733 XSetForeground (display, face->gc, face->foreground); |
734 } | 734 } |
735 | 735 |
736 if (p->which != NO_FRINGE_BITMAP) | 736 if (p->which) |
737 { | 737 { |
738 unsigned char *bits = fringe_bitmaps[p->which].bits + p->dh; | 738 unsigned char *bits = p->bits + p->dh; |
739 Pixmap pixmap; | 739 Pixmap pixmap, clipmask = (Pixmap) 0; |
740 int depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f)); | 740 int depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f)); |
741 XGCValues gcv; | |
741 | 742 |
742 /* Draw the bitmap. I believe these small pixmaps can be cached | 743 /* Draw the bitmap. I believe these small pixmaps can be cached |
743 by the server. */ | 744 by the server. */ |
744 pixmap = XCreatePixmapFromBitmapData (display, window, bits, p->wd, p->h, | 745 pixmap = XCreatePixmapFromBitmapData (display, window, bits, p->wd, p->h, |
745 face->foreground, | 746 (p->cursor_p |
747 ? (p->overlay_p ? face->background | |
748 : f->output_data.x->cursor_pixel) | |
749 : face->foreground), | |
746 face->background, depth); | 750 face->background, depth); |
751 | |
752 if (p->overlay_p) | |
753 { | |
754 clipmask = XCreatePixmapFromBitmapData (display, | |
755 FRAME_X_DISPLAY_INFO (f)->root_window, | |
756 bits, p->wd, p->h, | |
757 1, 0, 1); | |
758 gcv.clip_mask = clipmask; | |
759 gcv.clip_x_origin = p->x; | |
760 gcv.clip_y_origin = p->y; | |
761 XChangeGC (display, gc, GCClipMask | GCClipXOrigin | GCClipYOrigin, &gcv); | |
762 } | |
763 | |
747 XCopyArea (display, pixmap, window, gc, 0, 0, | 764 XCopyArea (display, pixmap, window, gc, 0, 0, |
748 p->wd, p->h, p->x, p->y); | 765 p->wd, p->h, p->x, p->y); |
749 XFreePixmap (display, pixmap); | 766 XFreePixmap (display, pixmap); |
767 | |
768 if (p->overlay_p) | |
769 { | |
770 gcv.clip_mask = (Pixmap) 0; | |
771 XChangeGC (display, gc, GCClipMask, &gcv); | |
772 XFreePixmap (display, clipmask); | |
773 } | |
750 } | 774 } |
751 | 775 |
752 XSetClipMask (display, gc, None); | 776 XSetClipMask (display, gc, None); |
753 } | 777 } |
754 | 778 |
10865 #endif | 10889 #endif |
10866 x_clear_window_mouse_face, | 10890 x_clear_window_mouse_face, |
10867 x_get_glyph_overhangs, | 10891 x_get_glyph_overhangs, |
10868 x_fix_overlapping_area, | 10892 x_fix_overlapping_area, |
10869 x_draw_fringe_bitmap, | 10893 x_draw_fringe_bitmap, |
10894 0, /* define_fringe_bitmap */ | |
10895 0, /* destroy_fringe_bitmap */ | |
10870 x_per_char_metric, | 10896 x_per_char_metric, |
10871 x_encode_char, | 10897 x_encode_char, |
10872 x_compute_glyph_string_overhangs, | 10898 x_compute_glyph_string_overhangs, |
10873 x_draw_glyph_string, | 10899 x_draw_glyph_string, |
10874 x_define_frame_cursor, | 10900 x_define_frame_cursor, |