+2019-06-25  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-wingeneral.c (tui_win_info::make_visible)
+       (tui_source_window_base::make_visible): New methods.
+       (make_all_visible): Make method call.
+       * tui/tui-data.h (struct tui_win_info) <make_visible>: New method.
+       (struct tui_source_window_base, struct tui_cmd_window): Override
+       make_visible.
+       (tui_win_is_source_type): Don't declare.
+       * tui/tui-data.c (tui_win_is_source_type): Remove.
+
 2019-06-25  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-layout.c (show_source_or_disasm_and_command): Remove
 
 ** PUBLIC FUNCTIONS
 **********************************/
 
-int
-tui_win_is_source_type (enum tui_win_type win_type)
-{
-  return (win_type == SRC_WIN || win_type == DISASSEM_WIN);
-}
-
 int
 tui_win_is_auxillary (enum tui_win_type win_type)
 {
 
     return false;
   }
 
+  /* Make this window visible or invisible.  */
+  virtual void make_visible (int visible);
+
   /* Methods to scroll the contents of this window.  Note that they
      are named with "_scroll" coming at the end because the more
      obvious "scroll_forward" is defined as a macro in term.h.  */
     return m_has_locator;
   }
 
+  void make_visible (int visible) override;
+
   /* Does the locator belong to this window?  */
   bool m_has_locator = false;
   /* Execution information window.  */
 
   void clear_detail () override;
 
+  void make_visible (int visible) override
+  {
+  }
+
   int start_line = 0;
 
 protected:
   }
 };
 
-extern int tui_win_is_source_type (enum tui_win_type win_type);
 extern int tui_win_is_auxillary (enum tui_win_type win_type);
 extern void tui_set_win_highlight (struct tui_win_info *win_info,
                                   int highlight);
 
   make_visible (win_info, 0);
 }
 
+/* See tui-data.h.  */
+
+void
+tui_win_info::make_visible (int visible)
+{
+  ::make_visible (&generic, visible);
+}
+
+/* See tui-data.h.  */
+
+void
+tui_source_window_base::make_visible (int visible)
+{
+  ::make_visible (execution_info, visible);
+  tui_win_info::make_visible (visible);
+}
 
 /* Makes all windows invisible (except the command and locator
    windows).  */
 
   for (i = 0; i < MAX_MAJOR_WINDOWS; i++)
     {
-      if (tui_win_list[i] != NULL
-         && ((tui_win_list[i])->generic.type) != CMD_WIN)
-       {
-         if (tui_win_is_source_type ((tui_win_list[i])->generic.type))
-           {
-             tui_source_window_base *base
-               = (tui_source_window_base *) tui_win_list[i];
-             make_visible (base->execution_info, visible);
-           }
-         make_visible (&tui_win_list[i]->generic, visible);
-       }
+      if (tui_win_list[i] != NULL)
+       tui_win_list[i]->make_visible (visible);
     }
 
   return;