[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to restore the layout?
From: |
martin rudalics |
Subject: |
Re: How to restore the layout? |
Date: |
Wed, 03 Jul 2013 11:27:28 +0200 |
> 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
- Re: How to restore the layout?, martin rudalics, 2013/07/01
- Re: How to restore the layout?, martin rudalics, 2013/07/01
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/01
- Re: How to restore the layout?, martin rudalics, 2013/07/02
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/02
- Re: How to restore the layout?,
martin rudalics <=
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/03
- Re: How to restore the layout?, martin rudalics, 2013/07/03
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/03
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/03
- Re: How to restore the layout?, martin rudalics, 2013/07/04
- RE: How to restore the layout?, Drew Adams, 2013/07/03
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/07
- Re: How to restore the layout?, martin rudalics, 2013/07/08
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/08
RE: How to restore the layout?, Drew Adams, 2013/07/01