From 06f00d39ff73e0c6c87ffb09ef3d67e8d3446b01 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 12 Dec 2015 14:38:11 +0100 Subject: Fix frame height calculations with added menu bar on Windows (Bug#22105) * doc/lispref/frames.texi (Parameter Access): Mention pitfalls when simultaneously specifying multiple parameters for `modify-frame-parameters' that all may change the frame's size. * src/w32fns.c (x_set_menu_bar_lines): Don't set windows_or_buffers_changed here. (my_create_tip_window, Fx_show_tip): Call AdjustWindowRect with third argument false. * src/w32menu.c (set_frame_menubar): Set windows_or_buffers_changed here. * src/w32term.c (x_set_window_size): Determine third argument of AdjustWindowRect from whether the frame has a menu bar and not from whether it wants one. --- doc/lispref/frames.texi | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index b6f07200bfb..80a4af29f1a 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -1013,12 +1013,28 @@ display (@pxref{Frames}). If @var{alist} includes parameters that are not meaningful for the @var{frame}'s display, this function will change its value in the frame's parameter list, but will otherwise ignore it. + +When @var{alist} specifies more than one parameter whose value can +affect the new size of @var{frame}, the final size of the frame may +differ according to the toolkit used. For example, specifying that a +frame should from now on have a menu and/or tool bar instead of none and +simultaneously specifying the new height of the frame will inevitably +lead to a recalculation of the frame's height. Conceptually, in such +case, this function will try to have the explicit height specification +prevail. It cannot be excluded, however, that the addition (or removal) +of the menu or tool bar, when eventually performed by the toolkit, will +defeat this intention. + +Sometimes, binding @code{frame-inhibit-implied-resize} (@pxref{Implied +Frame Resizing}) to a non-@code{nil} value around calls to this function +may fix the problem sketched here. Sometimes, however, exactly such +binding may be hit by the problem. @end defun @defun set-frame-parameter frame parm value This function sets the frame parameter @var{parm} to the specified -@var{value}. If @var{frame} is @code{nil}, it defaults to the -selected frame. +@var{value}. If @var{frame} is @code{nil}, it defaults to the selected +frame. @end defun @defun modify-all-frames-parameters alist -- cgit v1.2.1