I noticed that tui_gen_win_info::make_visible was much wordier than it
needed to be. This simplifies it.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (tui_gen_win_info::make_visible):
Simplify.
2019-07-17 Tom Tromey <tom@tromey.com>
+ * tui/tui-wingeneral.c (tui_gen_win_info::make_visible):
+ Simplify.
+
+2019-07-17 Tom Tromey <tom@tromey.com>
+
* tui/tui-layout.c (show_source_disasm_command): Simplify window
resetting.
void
tui_gen_win_info::make_visible (bool visible)
{
+ if (is_visible == visible)
+ return;
+ is_visible = visible;
+
if (visible)
+ tui_make_window (this, (tui_win_is_auxiliary (type)
+ ? DONT_BOX_WINDOW : BOX_WINDOW));
+ else
{
- if (!is_visible)
- {
- tui_make_window (this, (tui_win_is_auxiliary (type)
- ? DONT_BOX_WINDOW : BOX_WINDOW));
- is_visible = true;
- }
- }
- else if (!visible
- && is_visible
- && handle != NULL)
- {
- is_visible = false;
tui_delete_win (handle);
handle = NULL;
}