diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-05 12:29:18 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-13 14:52:09 -0600 |
commit | 3f3ffe54e229482bdb0785ae2162f03d60870400 (patch) | |
tree | f8a5c7ae3054cb1661cb92c91277824ab5c31264 /gdb/tui/tui-layout.c | |
parent | 69258091762bce83b0f3dc9e07800b87bdc0649f (diff) | |
download | gdb-3f3ffe54e229482bdb0785ae2162f03d60870400.zip gdb-3f3ffe54e229482bdb0785ae2162f03d60870400.tar.gz gdb-3f3ffe54e229482bdb0785ae2162f03d60870400.tar.bz2 |
Simplify tui_make_all_invisible
This simplifies the implementation of tui_make_all_invisible. Also,
because show_data is only called by show_layout, this hoists the call
to tui_make_all_invisible and removes the call from show_data.
gdb/ChangeLog
2019-08-13 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (make_all_visible): Remove.
(tui_make_all_invisible): Simplify.
* tui/tui-layout.c (tui_make_all_invisible): Move from
tui-wingeneral.c; simplify.
(show_layout): Hoist call to tui_make_all_invisible.
(show_data): Don't call tui_make_all_invisible.
Diffstat (limited to 'gdb/tui/tui-layout.c')
-rw-r--r-- | gdb/tui/tui-layout.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 2b25e7a..3ee3354 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -80,6 +80,9 @@ show_layout (enum tui_layout_type layout) should free the content and reallocate on next display of source/asm. */ tui_clear_source_windows (); + /* First make the current layout be invisible. */ + tui_make_all_invisible (); + tui_locator_win_info_ptr ()->make_visible (false); if (layout == SRC_DATA_COMMAND || layout == DISASSEM_DATA_COMMAND) { @@ -88,10 +91,6 @@ show_layout (enum tui_layout_type layout) } else { - /* First make the current layout be invisible. */ - tui_make_all_invisible (); - tui_locator_win_info_ptr ()->make_visible (false); - switch (layout) { /* Now show the new layout. */ @@ -571,8 +570,6 @@ show_data (enum tui_layout_type new_layout) data_height = total_height / 2; src_height = total_height - data_height; - tui_make_all_invisible (); - locator->make_visible (false); if (tui_win_list[DATA_WIN] == nullptr) tui_win_list[DATA_WIN] = new tui_data_window (); tui_win_list[DATA_WIN]->reset (data_height, tui_term_width (), 0, 0); |