[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't start Emacs on a monochrome display
From: |
Kenichi Handa |
Subject: |
Re: Can't start Emacs on a monochrome display |
Date: |
Thu, 31 Jul 2003 09:58:45 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Kenichi Handa <address@hidden> writes:
> I tracked this problem down to this change:
> 2003-07-13 Terje Rosten <address@hidden>
> * xterm.c (x_bitmap_icon,x_wm_set_icon_pixmap): Modify to add mask,
> and use the Gtk+ function gtk_window_icon_from_file if available.
> * xfns.c (x_bitmap_mask, x_create_bitmap_mask): New functions to
> handle mask of bitmaps.
> (x_allocate_bitmap_record, x_destroy_bitmap): Modify to handle the
> mask property.
> (xg_set_icon): New function, wrapper for gtk_window_icon_from_file.
> * xterm.h (xg_set_icon): New function.
> When I cancel this change, Emacs starts up correctly on a
> monochrome display.
I found what's wrong. On monochrome display, Emacs calls
load_pixmap to make a stipple of a face. This function
creates a pixmap without mask. But, x_destroy_bitmap
unconditionaly tries to free a mask, thus xlib will free
unallocated memory. So, I've installed these changes.
2003-07-31 Kenichi Handa <address@hidden>
* 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.
---
Ken'ichi HANDA
address@hidden