aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2020-12-21 14:26:29 +0100
committerHannes Domani <ssbssa@yahoo.de>2021-01-05 14:08:26 +0100
commit5519536196e670c3c0fb2b138acc44049227e724 (patch)
tree0fc0eb0f75778e15aaa627140d618dcbebe6fd9e /gdb
parent1b6d4bb2232ff9fd692a332a491b95b5f4052dfe (diff)
downloadfsf-binutils-gdb-5519536196e670c3c0fb2b138acc44049227e724.zip
fsf-binutils-gdb-5519536196e670c3c0fb2b138acc44049227e724.tar.gz
fsf-binutils-gdb-5519536196e670c3c0fb2b138acc44049227e724.tar.bz2
Prevent flickering when redrawing the TUI source window
tui_win_info::refresh_window simply calls wrefresh, which internally does a doupdate. This redraws the source background window without the source pad. Then prefresh of the source pad draws the actual source code on top, which flickers. By changing this to wnoutrefresh, the actual drawing on the screen is only done once in the following prefresh, without flickering. gdb/ChangeLog: 2021-01-05 Hannes Domani <ssbssa@yahoo.de> * tui/tui-winsource.c (tui_source_window_base::refresh_window): Call wnoutrefresh instead of tui_win_info::refresh_window.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/tui/tui-winsource.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 20ceaa2..4a7d801 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2021-01-05 Hannes Domani <ssbssa@yahoo.de>
+ * tui/tui-winsource.c (tui_source_window_base::refresh_window):
+ Call wnoutrefresh instead of tui_win_info::refresh_window.
+
+2021-01-05 Hannes Domani <ssbssa@yahoo.de>
+
* tui/tui-source.c (tui_source_window::show_line_number):
Redraw second space after line number.
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index 55b66e1..40fd00f 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -252,7 +252,9 @@ tui_source_window_base::show_source_line (int lineno)
void
tui_source_window_base::refresh_window ()
{
- tui_win_info::refresh_window ();
+ /* tui_win_info::refresh_window would draw the empty background window to
+ the screen, potentially creating a flicker. */
+ wnoutrefresh (handle.get ());
int pad_width = std::max (m_max_length, width);
int left_margin = 1 + TUI_EXECINFO_SIZE + extra_margin ();