diff options
| author | YAMAMOTO Mitsuharu | 2007-06-23 01:50:22 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2007-06-23 01:50:22 +0000 |
| commit | e855c5d81e526cb40b3c2abd14ecec12a36592b5 (patch) | |
| tree | c33b04526375a6a3f22848dd3f18939c913f9176 | |
| parent | d8e4eadf9ba37eed47de1bb694b56ff25b2d4e59 (diff) | |
| download | emacs-e855c5d81e526cb40b3c2abd14ecec12a36592b5.tar.gz emacs-e855c5d81e526cb40b3c2abd14ecec12a36592b5.zip | |
(x_draw_fringe_bitmap) [MAC_OSX]: Extend fringe background
to scroll bar gap also when bitmap fills fringe. Draw only foreground
if extended background has already been filled.
| -rw-r--r-- | src/macterm.c | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/macterm.c b/src/macterm.c index 85799cddc23..0d7aa68bbea 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -2194,11 +2194,12 @@ x_draw_fringe_bitmap (w, row, p) | |||
| 2194 | Display *display = FRAME_MAC_DISPLAY (f); | 2194 | Display *display = FRAME_MAC_DISPLAY (f); |
| 2195 | struct face *face = p->face; | 2195 | struct face *face = p->face; |
| 2196 | int rowY; | 2196 | int rowY; |
| 2197 | int overlay_p = p->overlay_p; | ||
| 2197 | 2198 | ||
| 2198 | #ifdef MAC_OSX | 2199 | #ifdef MAC_OSX |
| 2199 | if (p->bx >= 0 && !p->overlay_p) | 2200 | if (!overlay_p) |
| 2200 | { | 2201 | { |
| 2201 | int bx = p->bx, nx = p->nx; | 2202 | int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny; |
| 2202 | 2203 | ||
| 2203 | #if 0 /* MAC_TODO: stipple */ | 2204 | #if 0 /* MAC_TODO: stipple */ |
| 2204 | /* In case the same realized face is used for fringes and | 2205 | /* In case the same realized face is used for fringes and |
| @@ -2227,6 +2228,21 @@ x_draw_fringe_bitmap (w, row, p) | |||
| 2227 | int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) | 2228 | int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) |
| 2228 | * FRAME_COLUMN_WIDTH (f)); | 2229 | * FRAME_COLUMN_WIDTH (f)); |
| 2229 | 2230 | ||
| 2231 | if (bx < 0 | ||
| 2232 | && (left + width == p->x | ||
| 2233 | || p->x + p->wd == left)) | ||
| 2234 | { | ||
| 2235 | /* Bitmap fills the fringe and we need background | ||
| 2236 | extension. */ | ||
| 2237 | int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 2238 | |||
| 2239 | bx = p->x; | ||
| 2240 | nx = p->wd; | ||
| 2241 | by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, | ||
| 2242 | row->y)); | ||
| 2243 | ny = row->visible_height; | ||
| 2244 | } | ||
| 2245 | |||
| 2230 | if (left + width == bx) | 2246 | if (left + width == bx) |
| 2231 | { | 2247 | { |
| 2232 | bx = left + sb_width; | 2248 | bx = left + sb_width; |
| @@ -2237,7 +2253,12 @@ x_draw_fringe_bitmap (w, row, p) | |||
| 2237 | } | 2253 | } |
| 2238 | } | 2254 | } |
| 2239 | 2255 | ||
| 2240 | mac_erase_rectangle (f, face->gc, bx, p->by, nx, p->ny); | 2256 | if (bx >= 0) |
| 2257 | { | ||
| 2258 | mac_erase_rectangle (f, face->gc, bx, by, nx, ny); | ||
| 2259 | /* The fringe background has already been filled. */ | ||
| 2260 | overlay_p = 1; | ||
| 2261 | } | ||
| 2241 | 2262 | ||
| 2242 | #if 0 /* MAC_TODO: stipple */ | 2263 | #if 0 /* MAC_TODO: stipple */ |
| 2243 | if (!face->stipple) | 2264 | if (!face->stipple) |
| @@ -2302,10 +2323,10 @@ x_draw_fringe_bitmap (w, row, p) | |||
| 2302 | : face->foreground)); | 2323 | : face->foreground)); |
| 2303 | #if USE_CG_DRAWING | 2324 | #if USE_CG_DRAWING |
| 2304 | mac_draw_cg_image (fringe_bmp[p->which], f, face->gc, 0, p->dh, | 2325 | mac_draw_cg_image (fringe_bmp[p->which], f, face->gc, 0, p->dh, |
| 2305 | p->wd, p->h, p->x, p->y, p->overlay_p); | 2326 | p->wd, p->h, p->x, p->y, overlay_p); |
| 2306 | #else | 2327 | #else |
| 2307 | mac_draw_bitmap (f, face->gc, p->x, p->y, | 2328 | mac_draw_bitmap (f, face->gc, p->x, p->y, |
| 2308 | p->wd, p->h, p->bits + p->dh, p->overlay_p); | 2329 | p->wd, p->h, p->bits + p->dh, overlay_p); |
| 2309 | #endif | 2330 | #endif |
| 2310 | XSetForeground (display, face->gc, gcv.foreground); | 2331 | XSetForeground (display, face->gc, gcv.foreground); |
| 2311 | } | 2332 | } |