diff options
| author | Jason Rumney | 2004-02-16 00:54:02 +0000 |
|---|---|---|
| committer | Jason Rumney | 2004-02-16 00:54:02 +0000 |
| commit | f3336ea4a16bb4a7612f527ab8ce510c7956c600 (patch) | |
| tree | 24e04b023375017d69dfadf03cc6c24cebd4c66b /src | |
| parent | 8d50508a88ff3aba8dd08209c00782d3e73a569e (diff) | |
| download | emacs-f3336ea4a16bb4a7612f527ab8ce510c7956c600.tar.gz emacs-f3336ea4a16bb4a7612f527ab8ce510c7956c600.zip | |
(w32_draw_fringe_bitmap): Handle overlay fringe bitmaps.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/src/w32term.c b/src/w32term.c index 7fa3ca0fece..d2e8f8993b8 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -711,43 +711,33 @@ w32_draw_fringe_bitmap (w, row, p) | |||
| 711 | HANDLE horig_obj; | 711 | HANDLE horig_obj; |
| 712 | 712 | ||
| 713 | compat_hdc = CreateCompatibleDC (hdc); | 713 | compat_hdc = CreateCompatibleDC (hdc); |
| 714 | |||
| 714 | SaveDC (hdc); | 715 | SaveDC (hdc); |
| 715 | 716 | ||
| 716 | horig_obj = SelectObject (compat_hdc, pixmap); | 717 | horig_obj = SelectObject (compat_hdc, pixmap); |
| 717 | SetTextColor (hdc, face->background); | 718 | SetTextColor (hdc, face->background); |
| 718 | SetBkColor (hdc, face->foreground); | 719 | SetBkColor (hdc, p->cursor_p |
| 719 | 720 | ? (p->overlay_p ? face->background | |
| 720 | #if 0 /* TODO: fringe overlay_p and cursor_p */ | ||
| 721 | SetBkColor (hdc, (p->cursor_p | ||
| 722 | ? (p->overlay_p ? face->background | ||
| 723 | : f->output_data.w32->cursor_pixel) | 721 | : f->output_data.w32->cursor_pixel) |
| 724 | : face->foreground)); | 722 | : face->foreground); |
| 725 | |||
| 726 | if (p->overlay_p) | ||
| 727 | { | ||
| 728 | clipmask = XCreatePixmapFromBitmapData (display, | ||
| 729 | FRAME_X_DISPLAY_INFO (f)->root_window, | ||
| 730 | bits, p->wd, p->h, | ||
| 731 | 1, 0, 1); | ||
| 732 | gcv.clip_mask = clipmask; | ||
| 733 | gcv.clip_x_origin = p->x; | ||
| 734 | gcv.clip_y_origin = p->y; | ||
| 735 | XChangeGC (display, gc, GCClipMask | GCClipXOrigin | GCClipYOrigin, &gcv); | ||
| 736 | } | ||
| 737 | #endif | ||
| 738 | |||
| 739 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | ||
| 740 | compat_hdc, 0, p->dh, | ||
| 741 | SRCCOPY); | ||
| 742 | 723 | ||
| 743 | #if 0 /* TODO: fringe overlay_p and cursor_p */ | 724 | /* Paint overlays transparently. */ |
| 744 | if (p->overlay_p) | 725 | if (p->overlay_p) |
| 745 | { | 726 | { |
| 746 | gcv.clip_mask = (Pixmap) 0; | 727 | BitBlt (hdc, p->x, p->y, p->wd, p->h, |
| 747 | XChangeGC (display, gc, GCClipMask, &gcv); | 728 | compat_hdc, 0, p->dh, |
| 748 | XFreePixmap (display, clipmask); | 729 | DSTINVERT); |
| 730 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | ||
| 731 | compat_hdc, 0, p->dh, | ||
| 732 | MERGEPAINT); | ||
| 733 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | ||
| 734 | compat_hdc, 0, p->dh, | ||
| 735 | DSTINVERT); | ||
| 749 | } | 736 | } |
| 750 | #endif | 737 | else |
| 738 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | ||
| 739 | compat_hdc, 0, p->dh, | ||
| 740 | SRCCOPY); | ||
| 751 | 741 | ||
| 752 | SelectObject (compat_hdc, horig_obj); | 742 | SelectObject (compat_hdc, horig_obj); |
| 753 | DeleteDC (compat_hdc); | 743 | DeleteDC (compat_hdc); |