diff options
author | Martin Rudalics <rudalics@gmx.at> | 2014-11-07 11:49:22 +0100 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2014-11-07 11:49:22 +0100 |
commit | 1c50b3adb636addc4244942e8f0e33b1e557ec07 (patch) | |
tree | fc452db1b888d5833e915778ad795c9d86f06678 /doc | |
parent | a067ef9a5ddc9812e35734e8c027684e01d684ef (diff) | |
download | emacs-1c50b3adb636addc4244942e8f0e33b1e557ec07.tar.gz |
Improve inhibiting of implied frame resizes.
* frames.texi (Size and Position): Rewrite description of
`frame-inhibit-implied-resize'.
* cus-start.el (frame-resize-pixelwise): Fix group.
(frame-inhibit-implied-resize): Add entry.
* dispnew.c (change_frame_size_1): Fix call of
adjust_frame_size.
* frame.c (Qsize, Qframe_position, Qframe_outer_size)
(Qframe_inner_size, Qexternal_border_size, Qtitle_height)
(Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
(Qtool_bar_size): New constants.
(frame_inhibit_resize, adjust_frame_size): New argument to
handle case where frame_inhibit_implied_resize is a list.
(Fmake_terminal_frame, Fset_frame_height, Fset_frame_width)
(Fset_frame_size, x_set_left_fringe, x_set_right_fringe)
(x_set_right_divider_width, x_set_bottom_divider_width)
(x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars)
(x_set_scroll_bar_width, x_set_scroll_bar_height): Update
callers.
(frame-inhibit-implied-resize): Rewrite doc-string.
* frame.h (frame_inhibit_resize, adjust_frame_size): Fix
external declarations.
(Qframe_position, Qframe_outer_size)
(Qframe_inner_size, Qexternal_border_size, Qtitle_height)
(Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
(Qtool_bar_size): Extern them.
* gtkutil.c (FRAME_TOTAL_PIXEL_HEIGHT, FRAME_TOTAL_PIXEL_WIDTH)
(xg_height_or_width_changed): Remove.
(xg_frame_set_char_size): Adjust adjust_frame_size calls.
(menubar_map_cb, xg_update_frame_menubar, free_frame_menubar)
(tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
(xg_change_toolbar_position): Call adjust_frame_size directly.
* nsfns.m (x_set_internal_border_width, Fx_create_frame): Fix
calls of adjust_frame_size.
* w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines)
(Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size
calls.
(x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
frame can get resized when tool-bar-lines parameter changes from
or to zero.
(Fw32_frame_menu_bar_size): Return fourth value.
(Fw32_frame_rect): Block input around system calls
(Fx_frame_geometry): New function.
* w32menu.c (set_frame_menubar): Adjust adjust_frame_size call.
* w32term.c (x_new_font): Adjust adjust_frame_size call.
* widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize
call.
* window.c (Fset_window_configuration): Adjust adjust_frame_size
call.
* xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
(Fx_create_frame): Adjust adjust_frame_size calls.
(x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
frame can get resized when tool-bar-lines parameter changes from
or to zero.
(Fx_frame_geometry): New function.
* xmenu.c (update_frame_menubar): On Lucid call
adjust_frame_size with one pixel less height to avoid that
repeatedly adding/removing the menu bar grows the frame.
(free_frame_menubar): On Motif arrange to optionally preserve
the old frame height when removing the menu bar.
* xterm.c (x_new_font): Adjust adjust_frame_size call.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
-rw-r--r-- | doc/lispref/frames.texi | 50 |
2 files changed, 42 insertions, 13 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 356560f2576..9a7a6c8c8a6 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2014-11-07 Martin Rudalics <rudalics@gmx.at> + + * frames.texi (Size and Position): Rewrite description of + `frame-inhibit-implied-resize'. + 2014-10-22 Martin Rudalics <rudalics@gmx.at> * frames.texi (Size Parameters): Replace "frame contents" by diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 146170a967c..0bded22eade 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -1350,10 +1350,9 @@ frame's text area unaltered when, for example, adding or removing a menu bar, changing the default font or setting the width of the frame's scroll bars. This means, however, that in such case Emacs must ask the window manager to resize the display area of the frame in order to -accommodate the size change. (Note that with the exception of GTK+ -builds, adding, removing or wrapping the tool bar usually do not resize -the frame's display area, hence these may alter the number of displayed -lines.) +accommodate the size change. Note that wrapping a menu or tool bar +usually does not resize the frame's display area, hence this will alter +the number of displayed lines. Occasionally, such implied resizing of the display area may be unwanted, for example, when the frame is maximized or made fullscreen @@ -1361,15 +1360,40 @@ where it's turned off by default. In other cases you can disable implied resizing with the following option: @defopt frame-inhibit-implied-resize -If this option is @code{nil}, changing default font, menu bar mode, -fringe width, or scroll bars of a specific frame may resize the frame's -display area in order to preserve the number of columns or lines the -frame displays. If this option is non-@code{nil}, no such resizing is -done. - -When you add a tool bar or scroll bar to a frame that is not large -enough to accommodate one, Emacs will try to enlarge the frame even if -this option is non-@code{nil}. +If this option is @code{nil}, changing font, menu bar, tool bar, +internal borders, fringes or scroll bars of a specific frame may +implicitly resize the frame's display area in order to preserve the +number of columns or lines the frame displays. If this option is +non-@code{nil}, no implied resizing is done. + +The value of this option can be also be a list of frame parameters. In +that case, implied resizing is inhibited when changing a parameter that +appears in this list. The frame parameters currently handled by this +option are: @code{font}, @code{font-backend}, +@code{internal-border-width}, @code{menu-bar-lines} and +@code{tool-bar-lines}. + +Changing any of the @code{scroll-bar-width}, @code{scroll-bar-height}, +@code{vertical-scroll-bars}, @code{horizontal-scroll-bars}, +@code{left-fringe} and @code{right-fringe} frame parameters is handled +as if the frame contained just one live window. This means, for +example, that removing vertical scroll bars on a frame containing +several side by side windows will shrink the frame width by the width of +one scroll bar provided this option is @code{nil} and keep it unchanged +if this option is either @code{t} or a list containing +@code{vertical-scroll-bars}. + +The default value is @code{'(tool-bar-lines)} for Lucid, Motif and +Windows (which means that adding/removing a tool bar there does not +change the frame height), @code{nil} on all other window systems +including GTK+ (which means that changing any of the parameters listed +above may change the size of the frame), and @code{t} otherwise (which +means the frame size never changes implicitly when there's no window +system support). + +Note that when a frame is not large enough to accommodate a change of +any of the parameters listed above, Emacs may try to enlarge the frame +even if this option is non-@code{nil}. @end defopt @c FIXME? Belongs more in Emacs manual than here? |