From d6a00eba2accffec92a5974c2ad1f79612a6679e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 18 Jul 2019 14:38:39 -0600 Subject: Remove tui_win_info::refresh_all The TUI has two duplicate "re-render this window" methods, "rerender" and "refresh_all". They differ only slightly in semantics, so I wanted to see if they could be unified. After looking into this, I decided that refresh_all was not needed. There are 4 calls to tui_refresh_all_win (the only caller of this method): 1. tui_enable. This sets the layout, which renders the windows. 2. tui_cont_sig. Here, I think it's sufficient to simply redraw the current window contents from the curses backing store, because gdb state didn't change while it was suspended 3. tui_dispatch_ctrl_char. This is the C-l handler, and here it's explicitly enough to just refresh the screen (as above). 4. tui_refresh_all_command. This is the command equivalent of C-l. So, this patch removes this method entirely and simplifies tui_refresh_all_win. gdb/ChangeLog 2019-08-30 Tom Tromey * tui/tui-winsource.h (struct tui_source_window_base) : Don't declare. * tui/tui-winsource.c (tui_source_window_base::refresh_all): Remove. * tui/tui-win.c (tui_refresh_all_win): Don't call refresh_all or tui_show_locator_content. * tui/tui-regs.h (struct tui_data_window) : Don't declare. * tui/tui-regs.c (tui_data_window::refresh_all): Remove. * tui/tui-data.h (struct tui_win_info) : Don't declare. --- gdb/tui/tui-regs.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'gdb/tui/tui-regs.h') diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h index 1f9fa73..abf44c8 100644 --- a/gdb/tui/tui-regs.h +++ b/gdb/tui/tui-regs.h @@ -58,8 +58,6 @@ struct tui_data_window : public tui_win_info DISABLE_COPY_AND_ASSIGN (tui_data_window); - void refresh_all () override; - void refresh_window () override; const char *name () const override -- cgit v1.1