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: How to restore the layout? Date: Wed, 03 Jul 2013 11:27:28 +0200 Message-ID: <51D3EE80.9000304@gmx.at> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1372844998 25299 80.91.229.3 (3 Jul 2013 09:49:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Jul 2013 09:49:58 +0000 (UTC) Cc: Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 03 11:49:57 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 1UuJhE-0007S6-Ub for ged-emacs-devel@m.gmane.org; Wed, 03 Jul 2013 11:49:57 +0200 Original-Received: from localhost ([::1]:59455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuJhE-0007sW-DC for ged-emacs-devel@m.gmane.org; Wed, 03 Jul 2013 05:49:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuJhA-0007sP-SX for emacs-devel@gnu.org; Wed, 03 Jul 2013 05:49:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuJaO-0005TE-Fn for emacs-devel@gnu.org; Wed, 03 Jul 2013 05:42:55 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:57348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuJLf-0007Sh-Nr for emacs-devel@gnu.org; Wed, 03 Jul 2013 05:27:39 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.12]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MTuiV-1Ul8Qt42d7-00QlQb for ; Wed, 03 Jul 2013 11:27:38 +0200 Original-Received: (qmail invoked by alias); 03 Jul 2013 09:27:38 -0000 Original-Received: from 62-47-46-61.adsl.highway.telekom.at (EHLO [62.47.46.61]) [62.47.46.61] by mail.gmx.net (mp012) with SMTP; 03 Jul 2013 11:27:38 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19rbmIqcSdrniFGsTDhRrslNTbTwgctrltksqQhwb wpJjKn0n8nEX7Z In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.17.20 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:161461 Archived-At: > This is intended to be run before desktop--save-frames, I suppose? Yes, because it installs a frame parameter that should get saved by desktop--save-frames. > I'm seeing a frame height problem on Windows 7 with side-aligned > frames (=> the ones you get by typing Windows + Left or Windows + > Right). > > With a minimal .emacs, containing: > > (desktop-save-mode 1) > (setq desktop-restore-frames t) > > then > > emacs > W-left > C-x 5 2 > W-right > ;;; at this point, both frames height's are 65 lines > C-x 5 o > C-x C-c > emacs > ;;; now left frame's height is 65 lines, right frame's height is 68; > its top is also a bit higher 3 lines reserved for the toolbar, obviously. > Comparing the saved state before & after, there only differences are > the height and top parameters of the second frame, and obviously the > total-height in the window-state. Whatever happens, happens when > creating a new frame with (make-frame-on-display display saved-state). > > If you add > > (setq default-frame-alist '((tool-bar-lines . 0))) > > to .emacs, it doesn't happen anymore. ISTR some old bug report about this > > Any idea how to fix that? No. In a `fit-frame-to-buffer' function you find in my window.el I use a workaround with a comment going as ;; When tool-bar-mode is enabled and we just created a new ;; frame, reserve lines for toolbar resizing. Needed ;; because for reasons unknown to me Emacs (1) reserves one ;; line for the toolbar when making the initial frame and ;; toolbars are enabled, and (2) later adds the remaining ;; lines needed. Our code runs IN BETWEEN (1) and (2). ;; YMMV when you're on a system that behaves differently. 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. martin