+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.
+
2019-08-13 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.h (tui_make_all_visible): Don't declare.
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)
{
}
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. */
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);
}
}
-/* Makes all windows invisible (except the command and locator
- windows). */
-static void
-make_all_visible (bool visible)
-{
- for (tui_win_info *win_info : all_tui_windows ())
- win_info->make_visible (visible);
-}
+/* See tui-wingeneral.h. */
void
tui_make_all_invisible (void)
{
- make_all_visible (false);
+ for (tui_win_info *win_info : all_tui_windows ())
+ win_info->make_visible (false);
}
/* Function to refresh all the windows currently displayed. */
struct tui_win_info;
struct tui_gen_win_info;
-extern void tui_unhighlight_win (struct tui_win_info *);
+/* Makes all windows invisible. */
extern void tui_make_all_invisible (void);
+
+extern void tui_unhighlight_win (struct tui_win_info *);
extern void tui_make_window (struct tui_gen_win_info *, enum tui_box);
extern void tui_highlight_win (struct tui_win_info *);
extern void tui_check_and_display_highlight_if_needed (struct tui_win_info *);