diff options
| author | Martin Rudalics | 2014-11-07 11:49:22 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2014-11-07 11:49:22 +0100 |
| commit | 1c50b3adb636addc4244942e8f0e33b1e557ec07 (patch) | |
| tree | fc452db1b888d5833e915778ad795c9d86f06678 /doc | |
| parent | a067ef9a5ddc9812e35734e8c027684e01d684ef (diff) | |
| download | emacs-1c50b3adb636addc4244942e8f0e33b1e557ec07.tar.gz emacs-1c50b3adb636addc4244942e8f0e33b1e557ec07.zip | |
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 @@ | |||
| 1 | 2014-11-07 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * frames.texi (Size and Position): Rewrite description of | ||
| 4 | `frame-inhibit-implied-resize'. | ||
| 5 | |||
| 1 | 2014-10-22 Martin Rudalics <rudalics@gmx.at> | 6 | 2014-10-22 Martin Rudalics <rudalics@gmx.at> |
| 2 | 7 | ||
| 3 | * frames.texi (Size Parameters): Replace "frame contents" by | 8 | * 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 | |||
| 1350 | bar, changing the default font or setting the width of the frame's | 1350 | bar, changing the default font or setting the width of the frame's |
| 1351 | scroll bars. This means, however, that in such case Emacs must ask the | 1351 | scroll bars. This means, however, that in such case Emacs must ask the |
| 1352 | window manager to resize the display area of the frame in order to | 1352 | window manager to resize the display area of the frame in order to |
| 1353 | accommodate the size change. (Note that with the exception of GTK+ | 1353 | accommodate the size change. Note that wrapping a menu or tool bar |
| 1354 | builds, adding, removing or wrapping the tool bar usually do not resize | 1354 | usually does not resize the frame's display area, hence this will alter |
| 1355 | the frame's display area, hence these may alter the number of displayed | 1355 | the number of displayed lines. |
| 1356 | lines.) | ||
| 1357 | 1356 | ||
| 1358 | Occasionally, such implied resizing of the display area may be | 1357 | Occasionally, such implied resizing of the display area may be |
| 1359 | unwanted, for example, when the frame is maximized or made fullscreen | 1358 | 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 | |||
| 1361 | implied resizing with the following option: | 1360 | implied resizing with the following option: |
| 1362 | 1361 | ||
| 1363 | @defopt frame-inhibit-implied-resize | 1362 | @defopt frame-inhibit-implied-resize |
| 1364 | If this option is @code{nil}, changing default font, menu bar mode, | 1363 | If this option is @code{nil}, changing font, menu bar, tool bar, |
| 1365 | fringe width, or scroll bars of a specific frame may resize the frame's | 1364 | internal borders, fringes or scroll bars of a specific frame may |
| 1366 | display area in order to preserve the number of columns or lines the | 1365 | implicitly resize the frame's display area in order to preserve the |
| 1367 | frame displays. If this option is non-@code{nil}, no such resizing is | 1366 | number of columns or lines the frame displays. If this option is |
| 1368 | done. | 1367 | non-@code{nil}, no implied resizing is done. |
| 1369 | 1368 | ||
| 1370 | When you add a tool bar or scroll bar to a frame that is not large | 1369 | The value of this option can be also be a list of frame parameters. In |
| 1371 | enough to accommodate one, Emacs will try to enlarge the frame even if | 1370 | that case, implied resizing is inhibited when changing a parameter that |
| 1372 | this option is non-@code{nil}. | 1371 | appears in this list. The frame parameters currently handled by this |
| 1372 | option are: @code{font}, @code{font-backend}, | ||
| 1373 | @code{internal-border-width}, @code{menu-bar-lines} and | ||
| 1374 | @code{tool-bar-lines}. | ||
| 1375 | |||
| 1376 | Changing any of the @code{scroll-bar-width}, @code{scroll-bar-height}, | ||
| 1377 | @code{vertical-scroll-bars}, @code{horizontal-scroll-bars}, | ||
| 1378 | @code{left-fringe} and @code{right-fringe} frame parameters is handled | ||
| 1379 | as if the frame contained just one live window. This means, for | ||
| 1380 | example, that removing vertical scroll bars on a frame containing | ||
| 1381 | several side by side windows will shrink the frame width by the width of | ||
| 1382 | one scroll bar provided this option is @code{nil} and keep it unchanged | ||
| 1383 | if this option is either @code{t} or a list containing | ||
| 1384 | @code{vertical-scroll-bars}. | ||
| 1385 | |||
| 1386 | The default value is @code{'(tool-bar-lines)} for Lucid, Motif and | ||
| 1387 | Windows (which means that adding/removing a tool bar there does not | ||
| 1388 | change the frame height), @code{nil} on all other window systems | ||
| 1389 | including GTK+ (which means that changing any of the parameters listed | ||
| 1390 | above may change the size of the frame), and @code{t} otherwise (which | ||
| 1391 | means the frame size never changes implicitly when there's no window | ||
| 1392 | system support). | ||
| 1393 | |||
| 1394 | Note that when a frame is not large enough to accommodate a change of | ||
| 1395 | any of the parameters listed above, Emacs may try to enlarge the frame | ||
| 1396 | even if this option is non-@code{nil}. | ||
| 1373 | @end defopt | 1397 | @end defopt |
| 1374 | 1398 | ||
| 1375 | @c FIXME? Belongs more in Emacs manual than here? | 1399 | @c FIXME? Belongs more in Emacs manual than here? |