Remove tui_win_info::refresh_all
authorTom Tromey <tom@tromey.com>
Thu, 18 Jul 2019 20:38:39 +0000 (14:38 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 30 Aug 2019 18:57:10 +0000 (12:57 -0600)
commitd6a00eba2accffec92a5974c2ad1f79612a6679e
tree2319ac6eea7c7d8adc469d7f2ada9ea0abc2b17e
parent55b2657bdc4f9494c13f5b6f69dd7f67d72275c0
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  <tom@tromey.com>

* tui/tui-winsource.h (struct tui_source_window_base)
<refresh_all>: 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) <refresh_all>: Don't
declare.
* tui/tui-regs.c (tui_data_window::refresh_all): Remove.
* tui/tui-data.h (struct tui_win_info) <refresh_all>: Don't
declare.
gdb/ChangeLog
gdb/tui/tui-data.h
gdb/tui/tui-regs.c
gdb/tui/tui-regs.h
gdb/tui/tui-win.c
gdb/tui/tui-winsource.c
gdb/tui/tui-winsource.h