Subject: RE: bug#14032: 24.3.50; regression: `modify-frame-parameters' no longer works correctly

From: "Drew Adams" <[email-masked]>
Date: Fri, 22 Mar 2013 14:40:52 -0700

OK, here is a recipe from emacs -Q:

Load these three source files, in order: frame-fns.el, frame-cmds.el,
thumb-frm.el.  They are available here:
http://www.emacswiki.org/emacs/?action=elisp-area;context=0

Visit a lisp file in a separate frame (e.g. C-x 5 f).

Manually resize the lisp-file frame to be wider and taller than the default
size, enough so you will notice the difference (quite large, if you want).

C-z to thumbify the frame.  C-z to dethumbify it.  It should be as it was before
thumbification: same position, height, and width.  It is not - it seems to be
the default frame size.

That's the regression.

It's as if some parameters from `default-frame-alist' were being substituted for
some of the parameters provided explicitly to `modify-frame-parameters'.  ("It's
as if..." - I don't say that that is what is actually happening.)

The frame parameters before thumbifying are recorded on list
`thumfr-thumbnail-frames': there is an alist entry for each thumbnail frame; the
cdr is the list of frame parameters before that frame was thumbified.

It is those pre-thumbification parameters that are passed to
`modify-frame-parameters' when you hit C-z the second time (command
`iconify-or-deiconify-frame', which calls `thumfr-toggle-thumbnail-frame', which
calls `thumfr-dethumbify-frame', which calls (modify-frame-parameters frame
non-tf-params), where FRAME is the selected frame and NON-TF-PARAMS is the list
of frame parameters recorded before thumbification.

If you prefer, select the name "thumfr-dethumbify-frame", then thumbify, then
M-x C-y RET to call `thumfr-dethumbify-frame' directly.  Same wrong size
restored.

HTH.