From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: How to restore the layout? Date: Wed, 3 Jul 2013 07:08:50 -0700 (PDT) Message-ID: <08af0af0-7ed8-4a0a-9284-39d210f194ae@default> References: <51C5AA68.4000204@alice.it> <834ncifkq9.fsf@gnu.org> <83zjuae19s.fsf@gnu.org> <83r4fmdsw5.fsf@gnu.org> <85k3ldtion.fsf@member.fsf.org> <4E4C522D-DBCC-4133-A764-82C9CCE81E2D@swipnet.se> <8913208E-7FE2-41F5-AC93-000108413C47@swipnet.se> <51D126A4.50402@gmx.at> <51D2ADC1.5060902@gmx.at> <51D3EE80.9000304@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1372860553 5408 80.91.229.3 (3 Jul 2013 14:09:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Jul 2013 14:09:13 +0000 (UTC) Cc: Emacs developers To: martin rudalics , Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 03 16:09:12 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UuNk3-00058H-Ht for ged-emacs-devel@m.gmane.org; Wed, 03 Jul 2013 16:09:07 +0200 Original-Received: from localhost ([::1]:45836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuNk3-0002zy-1q for ged-emacs-devel@m.gmane.org; Wed, 03 Jul 2013 10:09:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuNju-0002rI-IV for emacs-devel@gnu.org; Wed, 03 Jul 2013 10:09:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuNjt-000389-B7 for emacs-devel@gnu.org; Wed, 03 Jul 2013 10:08:58 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:19555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuNjt-00037x-5W for emacs-devel@gnu.org; Wed, 03 Jul 2013 10:08:57 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r63E8qA1008449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Jul 2013 14:08:53 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r63E8pT2024898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Jul 2013 14:08:52 GMT Original-Received: from abhmt111.oracle.com (abhmt111.oracle.com [141.146.116.63]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r63E8pVx020219; Wed, 3 Jul 2013 14:08:51 GMT In-Reply-To: <51D3EE80.9000304@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161474 Archived-At: Haven't been following this part of the thread; dunno what I missed. > No. In a `fit-frame-to-buffer' function you find in my window.el Where can I find that? > I use a workaround with a comment going as >=20 > =09 ;; When tool-bar-mode is enabled and we just created a new > =09 ;; frame, reserve lines for toolbar resizing. Needed > =09 ;; because for reasons unknown to me Emacs (1) reserves one > =09 ;; line for the toolbar when making the initial frame and > =09 ;; toolbars are enabled, and (2) later adds the remaining > =09 ;; lines needed. Our code runs IN BETWEEN (1) and (2). > =09 ;; YMMV when you're on a system that behaves differently. >=20 > So this is still an unsolved mystery, probably to straighten out > differences with external toolbar implementations. I can look into it > again but do not expect too much. Drew should have experienece with > this problem as well. I'm afraid I don't have anything to offer here, sorry. My frame-fitting code pretty much side-steps handling of the tool bar (and it tries to DTRT for multiple Emacs versions). Here is a comment from the code: ;; `extra-lines' for minimum frame height. Starting with Emacs 21+, ;; `set-frame-size' includes the tool-bar and the minibuffer. For Emacs ;; without a toolkit, the one-line menu-bar is also included - add 1 line ;; for that. Add 1 line for the minibuffer, unless it is standalone. ;; Perhaps we should also take into account a possible horizontal scroll ;; bar, but we don't do that. To allow for the tool bar I just add (cdr (assq 'tool-bar-lines (frame-parameters frame))) to the needed height. A bigger problem for me is wrapped menu-bar lines (I guess the same problem is there for a wrapped tool bar too). This is my code comment: ;; We can't really know whether menu-bar gets wrapped. ;; Assume it wraps once.