Change tui_show_source_content to be a method
[deliverable/binutils-gdb.git] / gdb / tui / tui-layout.c
index 91db38404b30abdbf0190b8d884f62f9ea40b271..3683835954d0edce2e9dc919c98e8ee508af250e 100644 (file)
@@ -107,6 +107,8 @@ show_layout (enum tui_layout_type layout)
        default:
          break;
        }
+
+      tui_delete_invisible_windows ();
     }
 }
 
@@ -254,7 +256,7 @@ tui_add_win_to_layout (enum tui_win_type type)
 /* Answer the height of a window.  If it hasn't been created yet,
    answer what the height of a window would be based upon its type and
    the layout.  */
-int
+static int
 tui_default_win_height (enum tui_win_type type, 
                        enum tui_layout_type layout)
 {
@@ -518,7 +520,7 @@ show_source_disasm_command (void)
   struct tui_locator_window *locator = tui_locator_win_info_ptr ();
   gdb_assert (locator != nullptr);
 
-  tui_show_source_content (TUI_SRC_WIN);
+  TUI_SRC_WIN->show_source_content ();
   if (TUI_DISASM_WIN == NULL)
     tui_win_list[DISASSEM_WIN] = new tui_disasm_window ();
   TUI_DISASM_WIN->reset (asm_height,
@@ -534,7 +536,7 @@ show_source_disasm_command (void)
   TUI_DISASM_WIN->m_has_locator = true;
   locator->make_visible (true);
   tui_show_locator_content ();
-  tui_show_source_content (TUI_DISASM_WIN);
+  TUI_DISASM_WIN->show_source_content ();
 
   if (TUI_CMD_WIN == NULL)
     tui_win_list[CMD_WIN] = new tui_cmd_window ();
@@ -596,6 +598,7 @@ show_data (enum tui_layout_type new_layout)
   locator->make_visible (true);
   tui_show_locator_content ();
   tui_add_to_source_windows (base);
+  TUI_CMD_WIN->make_visible (true);
   current_layout = new_layout;
 }
 
@@ -661,7 +664,7 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
   win_info->m_has_locator = true;
   locator->make_visible (true);
   tui_show_locator_content ();
-  tui_show_source_content (win_info);
+  win_info->show_source_content ();
 
   if (TUI_CMD_WIN == NULL)
     tui_win_list[CMD_WIN] = new tui_cmd_window ();
This page took 0.042137 seconds and 4 git commands to generate.