From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [Fwd: Frame Height Different for Default Frame and Additional Frames] Date: Wed, 10 Oct 2007 08:51:24 +0200 Message-ID: <470C766C.1010503@gmx.at> References: <002501c8044b$fcc95390$6100000a@intermedinc.internal> <4701F8AC.6070900@gmx.at> <470A9D22.2040709@gmx.at> <470BF1BF.3000609@gmx.at> <470C695D.5010906@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1191999150 30340 80.91.229.12 (10 Oct 2007 06:52:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2007 06:52:30 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: =?ISO-8859-15?Q?Jan_Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 10 08:52:29 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IfVQg-0001KB-NO for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2007 08:52:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfVQb-00061x-Au for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2007 02:52:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IfVPw-0005Xd-Ab for emacs-devel@gnu.org; Wed, 10 Oct 2007 02:51:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IfVPv-0005VV-8f for emacs-devel@gnu.org; Wed, 10 Oct 2007 02:51:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfVPv-0005VH-02 for emacs-devel@gnu.org; Wed, 10 Oct 2007 02:51:39 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IfVPt-0006mh-Qe for emacs-devel@gnu.org; Wed, 10 Oct 2007 02:51:38 -0400 Original-Received: (qmail invoked by alias); 10 Oct 2007 06:51:36 -0000 Original-Received: from N880P001.adsl.highway.telekom.at (EHLO [62.47.53.225]) [62.47.53.225] by mail.gmx.net (mp012) with SMTP; 10 Oct 2007 08:51:36 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19ssnxTtwps4lc0YEkZVYyz39SRd+qa7zY8gYsWQ9 v16f9jH4qwTyH9 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <470C695D.5010906@swipnet.se> X-Y-GMX-Trusted: 0 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80495 Archived-At: > It has not been fixed. Further more, different toolkits/ports needs > different fixes, so the w32 port needs its own unique fix. I see. But isn't this frame size increase hardcoded in the following section of frame.c? /* This used to be done _before_ calling x_figure_window_size, but since the height is reset here, this was really a no-op. I assume that moving it here does what Gerd intended (although he no longer can remember what that was... ++KFS, 2003-03-25. */ /* 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 (toolbar_p && FRAME_TOOL_BAR_LINES (f)) { ... bar_height = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief; FRAME_LINES (f) += (bar_height + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f); } If I understand this code correctly, it always adds some lines to the default frame when a toolbar is present. Apparently it fails to do so for the initial frame on w32. The first comment is not really an enlightment in this regard. Could you clarify two things: (1) How is this code related to initial frames and default frames; does (should) it affect only the latter or both ? (2) Doesn't the (toolbar_p && FRAME_TOOL_BAR_LINES (f)) condition hardcode a size increase whenever a toolbar is present ? Also, the second comment seems to indicate that the frame size should remain constant regardless of whether a toolbar is present or not. Is this correct ?