From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Can't start Emacs on a monochrome display Date: Thu, 31 Jul 2003 09:58:45 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200307310058.JAA07553@etlken.m17n.org> References: <200307151137.UAA15223@etlken.m17n.org> <200307301317.WAA06628@etlken.m17n.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1059613281 6511 80.91.224.249 (31 Jul 2003 01:01:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 31 Jul 2003 01:01:21 +0000 (UTC) Cc: terjeros@phys.ntnu.no, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jul 31 03:01:19 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19i1oY-0001f9-00 for ; Thu, 31 Jul 2003 03:01:06 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19i1ql-00050v-00 for ; Thu, 31 Jul 2003 03:03:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19i1nM-0002jj-IL for emacs-devel@quimby.gnus.org; Wed, 30 Jul 2003 20:59:52 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19i1mt-0002Yg-F9 for emacs-devel@gnu.org; Wed, 30 Jul 2003 20:59:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19i1mq-0002TA-SY for emacs-devel@gnu.org; Wed, 30 Jul 2003 20:59:21 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19i1mP-0002Eo-Ol for emacs-devel@gnu.org; Wed, 30 Jul 2003 20:58:54 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6p2/3.7W-20010518204228) with ESMTP id h6V0wku12825; Thu, 31 Jul 2003 09:58:46 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6/3.7W-20010823150639) with ESMTP id h6V0wj909485; Thu, 31 Jul 2003 09:58:45 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id JAA07553; Thu, 31 Jul 2003 09:58:45 +0900 (JST) Original-To: handa@m17n.org In-reply-to: <200307301317.WAA06628@etlken.m17n.org> (message from Kenichi Handa on Wed, 30 Jul 2003 22:17:50 +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) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15747 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15747 In article <200307301317.WAA06628@etlken.m17n.org>, Kenichi Handa writes: > I tracked this problem down to this change: > 2003-07-13 Terje Rosten > * 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 * 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 handa@m17n.org