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: [Glenn Morris ] frame-height and make-frame inconsistency Date: 02 Apr 2003 00:47:55 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xbrzp96n8.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 1049231451 23215 80.91.224.249 (1 Apr 2003 21:10:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2003 21:10:51 +0000 (UTC) Cc: gmorris@ast.cam.ac.uk Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 01 23:10:49 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 190T0v-0005zX-00 for ; Tue, 01 Apr 2003 23:09:49 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 190T1g-0006Oa-00 for ; Tue, 01 Apr 2003 23:10:36 +0200 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 190Snh-0005tj-05 for emacs-devel@quimby.gnus.org; Tue, 01 Apr 2003 15:56:09 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 190SjV-0002rM-00 for emacs-devel@gnu.org; Tue, 01 Apr 2003 15:51:49 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 190Siv-0001zB-00 for emacs-devel@gnu.org; Tue, 01 Apr 2003 15:51:15 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 190Sh6-0006qb-00 for emacs-devel@gnu.org; Tue, 01 Apr 2003 15:49:20 -0500 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id C86F37C012; Tue, 1 Apr 2003 22:49:13 +0200 (CEST) Original-To: emacs-devel@gnu.org Original-Lines: 42 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:12814 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12814 Glenn Morris has found a case where the previously inactive code that "adds height of tool-bar to frame height" causes problems. > > In the current CVS, the value returned by frame-height does not seem > to be consistent with that used by make-frame. > > To reproduce: > > mv ~/.Xdefaults ~/.Xdefaults.off (if applicable) > > emacs -q --no-site-file > > (make-frame `(,(cons 'width (frame-width)) > ,(cons 'height (frame-height)))) > > Under 21.3, the new frame has the same dimensions as the old frame. > Under 21.3.50, the new one is taller (by the height of the tool-bar, AFAICS). > > > Configuration options in both cases (i686-pc-linux-gnu, X toolkit): > > --without-xim --with-x --with-x-toolkit=athena --without-toolkit-scroll-bars It would seem that the automatic resizing should only be applied to the initial frame, but then C-x 5 f doesn't make a frame of the same size as the initial frame. Maybe the proper fix is to let frame-height return the height excl. the tool-bar. Actually, a superficial skimming through various pieces of lisp code seem to assume that frame-height doesn't include the tool-bar height, so maybe it would be more appropriate for frame-parameters to return the height excl. the tool-bar height. The change is simple, but I'm not sure what the implications are... -- Kim F. Storm http://www.cua.dk