mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 20:00:46 -08:00
(x_create_bitmap_from_data): Initialize have_mask member to 0.
(x_create_bitmap_from_file): Likewise. (x_destroy_bitmap): Check have_mask member before freeing a mask. (x_destroy_all_bitmaps): Likewise. (x_create_bitmap_mask): Set have_mask member to 1.
This commit is contained in:
parent
1552d1ea9c
commit
97e7188e57
2 changed files with 18 additions and 2 deletions
|
|
@ -1,3 +1,14 @@
|
|||
2003-07-31 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* xterm.h (struct x_bitmap_record): New member have_mask.
|
||||
|
||||
* xfns.c (x_create_bitmap_from_data): Initialize have_mask member
|
||||
to 0.
|
||||
(x_create_bitmap_from_file): Likewise.
|
||||
(x_destroy_bitmap): Check have_mask member before freeing a mask.
|
||||
(x_destroy_all_bitmaps): Likewise.
|
||||
(x_create_bitmap_mask): Set have_mask member to 1.
|
||||
|
||||
2003-07-30 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* Makefile.in (CFLAGS) [!OPTIMIZE]: Undo previous change.
|
||||
|
|
|
|||
|
|
@ -623,6 +623,7 @@ x_create_bitmap_from_data (f, bits, width, height)
|
|||
|
||||
id = x_allocate_bitmap_record (f);
|
||||
dpyinfo->bitmaps[id - 1].pixmap = bitmap;
|
||||
dpyinfo->bitmaps[id - 1].have_mask = 0;
|
||||
dpyinfo->bitmaps[id - 1].file = NULL;
|
||||
dpyinfo->bitmaps[id - 1].refcount = 1;
|
||||
dpyinfo->bitmaps[id - 1].depth = 1;
|
||||
|
|
@ -674,6 +675,7 @@ x_create_bitmap_from_file (f, file)
|
|||
|
||||
id = x_allocate_bitmap_record (f);
|
||||
dpyinfo->bitmaps[id - 1].pixmap = bitmap;
|
||||
dpyinfo->bitmaps[id - 1].have_mask = 0;
|
||||
dpyinfo->bitmaps[id - 1].refcount = 1;
|
||||
dpyinfo->bitmaps[id - 1].file
|
||||
= (char *) xmalloc (SBYTES (file) + 1);
|
||||
|
|
@ -701,7 +703,8 @@ x_destroy_bitmap (f, id)
|
|||
{
|
||||
BLOCK_INPUT;
|
||||
XFreePixmap (FRAME_X_DISPLAY (f), dpyinfo->bitmaps[id - 1].pixmap);
|
||||
XFreePixmap (FRAME_X_DISPLAY (f), dpyinfo->bitmaps[id - 1].mask);
|
||||
if (dpyinfo->bitmaps[id - 1].have_mask)
|
||||
XFreePixmap (FRAME_X_DISPLAY (f), dpyinfo->bitmaps[id - 1].mask);
|
||||
if (dpyinfo->bitmaps[id - 1].file)
|
||||
{
|
||||
xfree (dpyinfo->bitmaps[id - 1].file);
|
||||
|
|
@ -723,7 +726,8 @@ x_destroy_all_bitmaps (dpyinfo)
|
|||
if (dpyinfo->bitmaps[i].refcount > 0)
|
||||
{
|
||||
XFreePixmap (dpyinfo->display, dpyinfo->bitmaps[i].pixmap);
|
||||
XFreePixmap (dpyinfo->display, dpyinfo->bitmaps[i].mask);
|
||||
if (dpyinfo->bitmaps[i].have_mask)
|
||||
XFreePixmap (dpyinfo->display, dpyinfo->bitmaps[i].mask);
|
||||
if (dpyinfo->bitmaps[i].file)
|
||||
xfree (dpyinfo->bitmaps[i].file);
|
||||
}
|
||||
|
|
@ -822,6 +826,7 @@ x_create_bitmap_mask(f, id)
|
|||
width, height);
|
||||
XFreeGC (FRAME_X_DISPLAY (f), gc);
|
||||
|
||||
dpyinfo->bitmaps[id - 1].have_mask = 1;
|
||||
dpyinfo->bitmaps[id - 1].mask = mask;
|
||||
|
||||
XDestroyImage (ximg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue