diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 31 | ||||
| -rw-r--r-- | src/xterm.c | 28 |
2 files changed, 59 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5ec2cf03895..285bbf211a0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,36 @@ | |||
| 1 | 2000-03-27 Gerd Moellmann <gerd@gnu.org> | 1 | 2000-03-27 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xterm.h (x_specified_cursor_type, x_copy_color): Add prototypes. | ||
| 4 | |||
| 5 | * xfaces.c (register_color, unregister_colors, unregister_colors) | ||
| 6 | [DEBUG_X_COLORS]: New functions. | ||
| 7 | (x_free_colors) [DEBUG_X_COLORS]: Unregister colors. | ||
| 8 | |||
| 9 | * xfns.c (x_set_cursor_color): Get color reference counts right. | ||
| 10 | |||
| 11 | * xterm.c (x_copy_color): New function. | ||
| 12 | (x_alloc_nearest_color) [DEBUG_X_COLORS]: Call register_color. | ||
| 13 | |||
| 14 | * buffer.h (MAX_PER_BUFFER_VARS): Renamed from MAX_BUFFER_LOCAL_VARS. | ||
| 15 | (PER_BUFFER_VAR_OFFSET): Renamed from BUFFER_LOCAL_VAR_OFFSET. | ||
| 16 | (PER_BUFFER_VAR_IDX): Renamed from BUFFER_LOCAL_VAR_IDX. | ||
| 17 | (PER_BUFFER_VALUE_P): Renamed from BUFFER_HAS_LOCAL_VALUE_P. | ||
| 18 | (SET_PER_BUFFER_VALUE_P): Renamed from SET_BUFFER_HAS_LOCAL_VALUE_P. | ||
| 19 | (PER_BUFFER_IDX): Renamed from BUFFER_LOCAL_IDX. | ||
| 20 | (PER_BUFFER_DEFAULT): Renamed from BUFFER_LOCAL_DEFAULT_VALUE. | ||
| 21 | (PER_BUFFER_VALUE): Renamed from BUFFER_LOCAL_VALUE. | ||
| 22 | (PER_BUFFER_SYMBOL): Renamed from BUFFER_LOCAL_SYMBOL. | ||
| 23 | (PER_BUFFER_TYPE): Renamed from BUFFER_LOCAL_TYPE. | ||
| 24 | |||
| 25 | * category.c, data.c, syntax.c, print.c: Use new macro names | ||
| 26 | for handling per-buffer variables. | ||
| 27 | |||
| 28 | * buffer.c (buffer_permanent_local_flags): Use MAX_PER_BUFFER_VARS | ||
| 29 | instead of MAX_BUFFER_LOCAL_VARS. | ||
| 30 | (last_per_buffer_idx): Renamed from max_buffer_local_idx. | ||
| 31 | |||
| 32 | * xfaces.c (lookup_face): Don't assert FACE_SUITABLE_FOR_CHAR_P. | ||
| 33 | |||
| 3 | * xfns.c (x_specified_cursor_type): New function. | 34 | * xfns.c (x_specified_cursor_type): New function. |
| 4 | (x_set_cursor_type): Use it. | 35 | (x_set_cursor_type): Use it. |
| 5 | 36 | ||
diff --git a/src/xterm.c b/src/xterm.c index a49171aab6d..216c633a584 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3207,10 +3207,38 @@ x_alloc_nearest_color (f, cmap, color) | |||
| 3207 | rc = XAllocColor (display, cmap, color); | 3207 | rc = XAllocColor (display, cmap, color); |
| 3208 | } | 3208 | } |
| 3209 | 3209 | ||
| 3210 | #ifdef DEBUG_X_COLORS | ||
| 3211 | if (rc) | ||
| 3212 | register_color (color->pixel); | ||
| 3213 | #endif /* DEBUG_X_COLORS */ | ||
| 3214 | |||
| 3210 | return rc; | 3215 | return rc; |
| 3211 | } | 3216 | } |
| 3212 | 3217 | ||
| 3213 | 3218 | ||
| 3219 | /* Allocate color PIXEL on frame F. PIXEL must already be allocated. | ||
| 3220 | It's necessary to do this instead of just using PIXEL directly to | ||
| 3221 | get color reference counts right. */ | ||
| 3222 | |||
| 3223 | unsigned long | ||
| 3224 | x_copy_color (f, pixel) | ||
| 3225 | struct frame *f; | ||
| 3226 | unsigned long pixel; | ||
| 3227 | { | ||
| 3228 | XColor color; | ||
| 3229 | |||
| 3230 | color.pixel = pixel; | ||
| 3231 | BLOCK_INPUT; | ||
| 3232 | XQueryColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), &color); | ||
| 3233 | XAllocColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), &color); | ||
| 3234 | UNBLOCK_INPUT; | ||
| 3235 | #ifdef DEBUG_X_COLORS | ||
| 3236 | register_color (pixel); | ||
| 3237 | #endif | ||
| 3238 | return color.pixel; | ||
| 3239 | } | ||
| 3240 | |||
| 3241 | |||
| 3214 | /* Allocate a color which is lighter or darker than *PIXEL by FACTOR | 3242 | /* Allocate a color which is lighter or darker than *PIXEL by FACTOR |
| 3215 | or DELTA. Try a color with RGB values multiplied by FACTOR first. | 3243 | or DELTA. Try a color with RGB values multiplied by FACTOR first. |
| 3216 | If this produces the same color as PIXEL, try a color where all RGB | 3244 | If this produces the same color as PIXEL, try a color where all RGB |