diff options
author | Tom Tromey <tom@tromey.com> | 2019-10-26 16:37:32 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-12-11 15:49:03 -0700 |
commit | d4eeccfe6b3395e12fcc03bdcc20439ccc399e2b (patch) | |
tree | e5fa11e0988ec21da67163b834142dce19fa8b1f /gdb/tui/tui-layout.c | |
parent | 3d97994549706f8f65fe9726b1fec1f0d643f822 (diff) | |
download | gdb-d4eeccfe6b3395e12fcc03bdcc20439ccc399e2b.zip gdb-d4eeccfe6b3395e12fcc03bdcc20439ccc399e2b.tar.gz gdb-d4eeccfe6b3395e12fcc03bdcc20439ccc399e2b.tar.bz2 |
Change "winheight" resizing to use new layout code
The "winheight" command resizes a specified window, resizing the other
windows in the layout to adapt. In the current code, this is done by
examining each possible layout separately. The new layout code has a
more general approach to handling this, and this patch simply removes
the old code in favor of a call into the new layout engine.
gdb/ChangeLog
2019-12-11 Tom Tromey <tom@tromey.com>
* tui/tui-win.c (tui_set_win_height_command): Call
tui_adjust_window_height.
(tui_adjust_win_heights, new_height_ok): Remove.
* tui/tui-layout.h (tui_adjust_window_height): Declare.
* tui/tui-layout.c (tui_adjust_window_height): New function.
Change-Id: I6bb681375a46adc8d29fd06f581deed4e078e78a
Diffstat (limited to 'gdb/tui/tui-layout.c')
-rw-r--r-- | gdb/tui/tui-layout.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 1884c2a..9ab89a8 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -70,6 +70,14 @@ tui_apply_current_layout () applied_layout->apply (0, 0, tui_term_width (), tui_term_height ()); } +/* See tui-layout. */ + +void +tui_adjust_window_height (struct tui_win_info *win, int new_height) +{ + applied_layout->adjust_size (win->name (), new_height); +} + /* Show the screen layout defined. */ static void show_layout (enum tui_layout_type layout) |