aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/tui/tui-layout.c9
-rw-r--r--gdb/tui/tui-wingeneral.c12
-rw-r--r--gdb/tui/tui-wingeneral.h4
4 files changed, 18 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9bb9cfd..f300180 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
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.
* tui/tui-wingeneral.c (tui_make_all_visible): Remove.
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);
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index 92a678c..79f93ce 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -165,19 +165,13 @@ tui_gen_win_info::make_visible (bool visible)
}
}
-/* 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. */
diff --git a/gdb/tui/tui-wingeneral.h b/gdb/tui/tui-wingeneral.h
index 3c035aa..051be6d 100644
--- a/gdb/tui/tui-wingeneral.h
+++ b/gdb/tui/tui-wingeneral.h
@@ -27,8 +27,10 @@
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 *);