From: Jason Rumney Date: Mon, 16 Feb 2004 00:54:02 +0000 (+0000) Subject: (w32_draw_fringe_bitmap): Handle overlay fringe bitmaps. X-Git-Tag: ttn-vms-21-2-B4~7614 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3336ea4a16bb4a7612f527ab8ce510c7956c600;p=emacs.git (w32_draw_fringe_bitmap): Handle overlay fringe bitmaps. --- 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) HANDLE horig_obj; compat_hdc = CreateCompatibleDC (hdc); + SaveDC (hdc); horig_obj = SelectObject (compat_hdc, pixmap); SetTextColor (hdc, face->background); - SetBkColor (hdc, face->foreground); - -#if 0 /* TODO: fringe overlay_p and cursor_p */ - SetBkColor (hdc, (p->cursor_p - ? (p->overlay_p ? face->background + SetBkColor (hdc, p->cursor_p + ? (p->overlay_p ? face->background : f->output_data.w32->cursor_pixel) - : face->foreground)); - - if (p->overlay_p) - { - clipmask = XCreatePixmapFromBitmapData (display, - FRAME_X_DISPLAY_INFO (f)->root_window, - bits, p->wd, p->h, - 1, 0, 1); - gcv.clip_mask = clipmask; - gcv.clip_x_origin = p->x; - gcv.clip_y_origin = p->y; - XChangeGC (display, gc, GCClipMask | GCClipXOrigin | GCClipYOrigin, &gcv); - } -#endif - - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - SRCCOPY); + : face->foreground); -#if 0 /* TODO: fringe overlay_p and cursor_p */ + /* Paint overlays transparently. */ if (p->overlay_p) { - gcv.clip_mask = (Pixmap) 0; - XChangeGC (display, gc, GCClipMask, &gcv); - XFreePixmap (display, clipmask); + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + DSTINVERT); + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + MERGEPAINT); + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + DSTINVERT); } -#endif + else + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + SRCCOPY); SelectObject (compat_hdc, horig_obj); DeleteDC (compat_hdc);