[PATCH 04/22] Prevent flickering when redrawing the TUI python window
Hannes Domani
ssbssa@yahoo.de
Sat Mar 6 17:33:59 GMT 2021
tui_win_info::refresh_window first redraws the background window, then
tui_wrefresh draws the python text on top of it, which flickers.
By using wnoutrefresh for the background window, the actual drawing on
the screen is only done once, without flickering.
---
gdb/python/py-tui.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c
index 39753aed468..02dcd6949df 100644
--- a/gdb/python/py-tui.c
+++ b/gdb/python/py-tui.c
@@ -91,12 +91,14 @@ class tui_py_window : public tui_win_info
void refresh_window () override
{
- tui_win_info::refresh_window ();
if (m_inner_window != nullptr)
{
+ wnoutrefresh (handle.get ());
touchwin (m_inner_window.get ());
tui_wrefresh (m_inner_window.get ());
}
+ else
+ tui_win_info::refresh_window ();
}
void click (int mouse_x, int mouse_y, int mouse_button) override;
--
2.30.1
More information about the Gdb-patches
mailing list