From d4eeccfe6b3395e12fcc03bdcc20439ccc399e2b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 26 Oct 2019 16:37:32 -0600 Subject: 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 * 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 --- gdb/tui/tui-layout.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/tui/tui-layout.h') diff --git a/gdb/tui/tui-layout.h b/gdb/tui/tui-layout.h index a9346ef504b..691d4ad2e22 100644 --- a/gdb/tui/tui-layout.h +++ b/gdb/tui/tui-layout.h @@ -177,4 +177,8 @@ extern void tui_set_layout (enum tui_layout_type); /* Apply the current layout. */ extern void tui_apply_current_layout (); +/* Adjust the window height of WIN to NEW_HEIGHT. */ +extern void tui_adjust_window_height (struct tui_win_info *win, + int new_height); + #endif /* TUI_TUI_LAYOUT_H */ -- cgit v1.2.1