aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-wingeneral.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-28 23:32:05 -0600
committerTom Tromey <tom@tromey.com>2019-07-17 12:19:11 -0600
commitcf82af058d2f1488d8f8a096d7e3b76d1d5a4f46 (patch)
treeb132b125d3a4ec0227664a8a0343e57be99160c4 /gdb/tui/tui-wingeneral.c
parent01aeb396d0e7a2d76f5f2391a30328dcdd5bed1e (diff)
downloadgdb-cf82af058d2f1488d8f8a096d7e3b76d1d5a4f46.zip
gdb-cf82af058d2f1488d8f8a096d7e3b76d1d5a4f46.tar.gz
gdb-cf82af058d2f1488d8f8a096d7e3b76d1d5a4f46.tar.bz2
Remove TUI data window special case
The TUI has a couple of special cases for updating the data window: one in tui_rl_other_windowand one in tui_set_focus_command. As part of the project to remove references to globals, I wanted to remove these calls; but when I did, some simple operations (like "C-x o") would cause the register window to blank. This fixes the underlying problem by arranging for the data window's refresh_window method to call the superclass method first, and then to refresh the child windows. Then the special cases can be removed. gdb/ChangeLog 2019-07-17 Tom Tromey <tom@tromey.com> * tui/tui.c (tui_rl_other_window): Update. * tui/tui-wingeneral.c (tui_data_window::refresh_window): Call superclass method first. Always iterate over regs_content. (tui_unhighlight_win, tui_highlight_win): Use refresh_window method. * tui/tui-win.c (tui_set_focus_command): Update.
Diffstat (limited to 'gdb/tui/tui-wingeneral.c')
-rw-r--r--gdb/tui/tui-wingeneral.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index 2902b80..dc008cd 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -48,15 +48,12 @@ tui_gen_win_info::refresh_window ()
void
tui_data_window::refresh_window ()
{
- if (!regs_content.empty ())
+ tui_gen_win_info::refresh_window ();
+ for (auto &&win : regs_content)
{
- for (auto &&win : regs_content)
- {
- if (win != NULL)
- win->refresh_window ();
- }
+ if (win != NULL)
+ win->refresh_window ();
}
- tui_gen_win_info::refresh_window ();
}
/* Function to delete the curses window, checking for NULL. */
@@ -108,7 +105,7 @@ tui_unhighlight_win (struct tui_win_info *win_info)
&& win_info->handle != NULL)
{
box_win (win_info, NO_HILITE);
- wrefresh (win_info->handle);
+ win_info->refresh_window ();
win_info->set_highlight (false);
}
}
@@ -122,7 +119,7 @@ tui_highlight_win (struct tui_win_info *win_info)
&& win_info->handle != NULL)
{
box_win (win_info, HILITE);
- wrefresh (win_info->handle);
+ win_info->refresh_window ();
win_info->set_highlight (true);
}
}