aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-07-11 18:03:45 -0600
committerTom Tromey <tom@tromey.com>2019-08-16 11:28:33 -0600
commit2d83e710a14c62cb6a9501c84fc46062f817428d (patch)
tree41d8a7abaf3e973def1e830242591b5eb24d432e /gdb/tui/tui-data.c
parentd4ab829a2477d454bd38544f1b88a043ec58581c (diff)
downloadgdb-2d83e710a14c62cb6a9501c84fc46062f817428d.zip
gdb-2d83e710a14c62cb6a9501c84fc46062f817428d.tar.gz
gdb-2d83e710a14c62cb6a9501c84fc46062f817428d.tar.bz2
Remove separate visibility flag
TUI windows keep track of their visibility in a boolean field. However, this is not needed, because a window is visible if and only if it has an underlying curses handle. So, we can remove this separate field. gdb/ChangeLog 2019-08-16 Tom Tromey <tom@tromey.com> * tui/tui.c (tui_is_window_visible): Update. * tui/tui-wingeneral.c (tui_make_window) (tui_gen_win_info::make_visible, tui_refresh_all): Update. * tui/tui-win.c (window_name_completer, tui_refresh_all_win) (tui_set_focus_command, tui_all_windows_info, update_tab_width) (tui_set_win_height_command, parse_scrolling_args): Update. * tui/tui-source.c (tui_source_window::style_changed): Update. * tui/tui-regs.c (tui_show_registers) (tui_data_window::first_data_item_displayed) (tui_data_window::delete_data_content_windows) (tui_check_register_values, tui_reg_command): Update. * tui/tui-disasm.c (tui_show_disassem): Update. * tui/tui-data.h (struct tui_gen_win_info) <is_visible>: New method. <is_visible>: Remove field. * tui/tui-data.c (tui_next_win, tui_prev_win) (tui_delete_invisible_windows): Update.
Diffstat (limited to 'gdb/tui/tui-data.c')
-rw-r--r--gdb/tui/tui-data.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index dc2c810..9b80aca 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -148,7 +148,7 @@ tui_next_win (struct tui_win_info *cur_win)
while (type != cur_win->type && (next_win == NULL))
{
if (tui_win_list[type]
- && tui_win_list[type]->is_visible)
+ && tui_win_list[type]->is_visible ())
next_win = tui_win_list[type];
else
{
@@ -178,7 +178,7 @@ tui_prev_win (struct tui_win_info *cur_win)
while (type != cur_win->type && (prev == NULL))
{
if (tui_win_list[type]
- && tui_win_list[type]->is_visible)
+ && tui_win_list[type]->is_visible ())
prev = tui_win_list[type];
else
{
@@ -220,7 +220,7 @@ tui_delete_invisible_windows ()
for (int win_type = SRC_WIN; (win_type < MAX_MAJOR_WINDOWS); win_type++)
{
if (tui_win_list[win_type] != NULL
- && !tui_win_list[win_type]->is_visible)
+ && !tui_win_list[win_type]->is_visible ())
{
/* This should always be made visible before a call to this
function. */