Subject: Re: bug#24526: iconifying / framesize

From: martin rudalics <[email-masked]>
Date: Tue, 27 Sep 2016 09:07:29 +0200

> I installed the released version of emacs-25.1 today. Thereby I can observe
 > differences in framesize between
 >
 > emacs -iconic
 >
 > and
 >
 > emacs
 >
 > both called from within an xterm. I configured the size of the frame in my
 > ".emacs" - file. Starting xwininfo and deiconifying emacs that had had been
 > started with "emacs -iconic" results in:
[...]
 >    -geometry 64x26+35+20
 >
 > In contrast, when simply triggering "emacs" not being iconic, I get
 > fred@djunix:~/rpmbuild/RPMS/x86_64> xwininfo
[...]
 >    -geometry 134x33+35+20
 >
 > The last lines from "-geometry" are very close to my settings from within
 > .emacs:
 >
 > (add-to-list 'default-frame-alist '(width . 135))
 > (add-to-list 'default-frame-alist '(height . 34))
 > (add-to-list 'default-frame-alist '(top . 20))
 > (add-to-list 'default-frame-alist '(left . 35))
 >
 > though the x- and y- size parameters are off by "1" this is no problem.

We should investigate this off-by-one issue separately.

In any case, what does evaluating (frame-geometry) return for the five
cases:

(1) emacs -Q

(2) emacs -Q -iconic

(3) emacs with your .emacs

(4) emacs -iconic with your .emacs

(5) emacs -iconic with your .emacs for the new frame after C-x 5 2

Maybe you could also try replacing ‘default-frame-alist’ with
‘initial-frame-alist’ but I doubt that would change anything.

 > However, the fact that the iconified emacs comes up with
 > -geometry 64x26+35+20 points me to the fact that the x- and y- size parameters
 > are not processed apropriately.

I suppose so.  I tried with your ‘default-frame-alist’ settings in
.emacs on Windows and can reproduce it with versions up from Emacs 21.
So apparently this never worked here.  Do you incidentally have an older
version of Emacs where this works correctly?  Which OS and window
manager do you use?

Thanks, martin