Subject: 24.3.50; frame shrinks vertically when enlarge or shrink it horizontally

From: Drew Adams <[email-masked]>
Date: Fri, 23 Aug 2013 20:22:27 -0700 (PDT)

This bug is very old.  Dunno whether I have reported it before (e.g.,
before the bug tracker was added).  Dunno whether it is related to the
recently reported bug #14627, which reminded me of it.

emacs -Q

Just to make it easier:

(defun enlarge-frame-horizontally (&optional increment frame)
  "Increase the width of FRAME (default: selected-frame) by INCREMENT.
INCREMENT is in columns (characters).
Interactively, it is given by the prefix argument."
  (interactive "p")
  (set-frame-width frame (+ (frame-width frame) increment)))

(global-set-key [(control meta right)] 'enlarge-frame-horizontally)

Choose any frame that is showing a menu bar.  Doesn't matter whether it
is also showing a tool bar.

Use the mouse to make the frame narrow enough that the menu bar wraps to
a second line.

Now try C-M-<right> one or more times.  The frame widens each time, but
it also shrinks vertically (the bug).

The same thing happens if you shrink the frame horizontally - same
uncalled-for vertical shrinking.

Dunno whether this is MS Windows-specific.  It is quite annoying for
someone who both (a) has multiple menu-bar menus and (b) adjusts frame
sizes using the keyboard, which I do.  I guess I've adjusted to the
annoyance over the years - I probably automatically avoid resizing
frames horizontally when they are already narrow enough to make the
menu-bar wrap.

FWIW - There used to be a somewhat similar bug that made the frame move
downward when you resized it.  That was finally fixed long ago.  Dunno
whether this problem or its solution might be related to that one.  That
one too was old enough that there was no bug number for it.

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-08-23 on ODIEONE
Bzr revision: 113986 [email-masked]
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'