From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Inactive code in x-create-frame on X and W32. Date: 25 Mar 2003 02:09:00 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xd6kgxnf7.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048551157 3062 80.91.224.249 (25 Mar 2003 00:12:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 25 Mar 2003 00:12:37 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 25 01:12:35 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 18xc3P-0000nE-00 for ; Tue, 25 Mar 2003 01:12:35 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18xc47-0006Mv-00 for ; Tue, 25 Mar 2003 01:13:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xc2G-0002YY-00 for emacs-devel@quimby.gnus.org; Mon, 24 Mar 2003 19:11:24 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18xc1P-0001cc-00 for emacs-devel@gnu.org; Mon, 24 Mar 2003 19:10:31 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18xc1C-0001Ox-00 for emacs-devel@gnu.org; Mon, 24 Mar 2003 19:10:18 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xc19-0001Ia-00; Mon, 24 Mar 2003 19:10:15 -0500 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 8AA697C012; Tue, 25 Mar 2003 01:10:11 +0100 (CET) Original-To: gerd@gnu.org Original-Lines: 55 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12583 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12583 In xfns.c (and later copied to w32fns.c), Fx_create_frame contains the following code: /* Add the tool-bar height to the initial frame height so that the user gets a text display area of the size he specified with -g or via .Xdefaults. Later changes of the tool-bar height don't change the frame size. This is done so that users can create tall Emacs frames without having to guess how tall the tool-bar will get. */ if (FRAME_TOOL_BAR_LINES (f)) { int margin, relief, bar_height; relief = (tool_bar_button_relief >= 0 ? tool_bar_button_relief : DEFAULT_TOOL_BAR_BUTTON_RELIEF); if (INTEGERP (Vtool_bar_button_margin) && XINT (Vtool_bar_button_margin) > 0) margin = XFASTINT (Vtool_bar_button_margin); else if (CONSP (Vtool_bar_button_margin) && INTEGERP (XCDR (Vtool_bar_button_margin)) && XINT (XCDR (Vtool_bar_button_margin)) > 0) margin = XFASTINT (XCDR (Vtool_bar_button_margin)); else margin = 0; bar_height = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief; f->height += (bar_height + CANON_Y_UNIT (f) - 1) / CANON_Y_UNIT (f); } /* Compute the size of the X window. */ window_prompting = x_figure_window_size (f, parms); But x_figure_window_size does the following unconditionally: f->height = DEFAULT_ROWS; So the result of the "if (FRAME_TOOL_BAR_LINES...)" block is effectively ignored. I would guess that the call to x_figure_window_size should be moved before adjusting f->height for the tool-bars, but I'm not quite sure what the intention is, since the ChangeLog explicitly says to do this _before_ calling x_figure_window_size: 2001-03-01 Gerd Moellmann * xfns.c (Fx_create_frame): Adjust the frame's height for presence of the tool bar before calling x_figure_window_size. So what's up, doc?