From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: x-create-frame is sluggish Date: Mon, 11 Oct 2004 09:54:00 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <200409250239.LAA15347@etlken.m17n.org> <200410010126.KAA01376@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1097481426 22444 80.91.229.6 (11 Oct 2004 07:57:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Oct 2004 07:57:06 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 11 09:56:56 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CGv39-00073T-00 for ; Mon, 11 Oct 2004 09:56:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CGv9M-0003dU-4a for ged-emacs-devel@m.gmane.org; Mon, 11 Oct 2004 04:03:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CGv8f-0003Uh-1E for emacs-devel@gnu.org; Mon, 11 Oct 2004 04:02:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CGv8T-0003SX-Ek for emacs-devel@gnu.org; Mon, 11 Oct 2004 04:02:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CGv8Q-0003SQ-Fe for emacs-devel@gnu.org; Mon, 11 Oct 2004 04:02:23 -0400 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CGv1M-00025v-4f; Mon, 11 Oct 2004 03:55:04 -0400 Original-Received: from coolsville.localdomain ([213.115.28.241] [213.115.28.241]) by mxfep02.bredband.com with ESMTP id <20041011075501.FLIN27821.mxfep02.bredband.com@coolsville.localdomain>; Mon, 11 Oct 2004 09:55:01 +0200 In-Reply-To: Original-To: Karoly.Lorentey@cern.ch (=?UTF-8?Q?L=C5=91rentey_K=C3=A1roly?=) X-Mailer: Apple Mail (2.619) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28221 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28221 > > *** diff-old/src/xfns.c 2004-10-11 00:24:05.000000000 +0200 > --- diff-new/src/xfns.c 2004-10-11 00:18:09.000000000 +0200 > *************** > *** 1953,1959 **** > --- 1953,1970 ---- > char **missing_list; > int missing_count; > char *def_string; > + Lisp_Object rest, frame; > > + /* See if there is another frame already using same fontset. */ > + FOR_EACH_FRAME (rest, frame) > + { > + struct frame *cf = XFRAME (frame); > + if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf) > + && !strcmp (FRAME_XIC_BASE_FONTNAME (cf), base_fontname)) > + return FRAME_XIC_FONTSET (cf); > + } You must check that the frames sharing the fontset is on the same display. > > + /* Free the X fontset of frame F if it is the last frame using it. */ > + > + void > + xic_delete_xfontset (f) > + struct frame *f; > + { > + Lisp_Object rest, frame; > + > + if (!FRAME_XIC_FONTSET (f)) > + return; > + > + /* See if there is another frame sharing the same fontset. */ > + FOR_EACH_FRAME (rest, frame) > + { > + struct frame *cf = XFRAME (frame); > + if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf) > + && FRAME_XIC_FONTSET (cf) == FRAME_XIC_FONTSET (f)) > + return; > + } > + /* The fontset is not used anymore. It is safe to free it. */ > + XFreeFontSet (FRAME_X_DISPLAY (f), FRAME_XIC_FONTSET (f)); > + } And here also. You did not include diffs for xterm.c and xterm.h. Jan D.