diff options
author | Tom Tromey <tom@tromey.com> | 2023-12-17 12:52:33 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-09-07 14:23:04 -0600 |
commit | d3acf3d759d085df544687b39a0c2900d3117bf7 (patch) | |
tree | a27f2f8f6e7814b3d1e24ebb159637412084beb6 /gdb/python | |
parent | 8f934adf59f11dd6c187c09521f7e7d84abcefbe (diff) | |
download | binutils-d3acf3d759d085df544687b39a0c2900d3117bf7.zip binutils-d3acf3d759d085df544687b39a0c2900d3117bf7.tar.gz binutils-d3acf3d759d085df544687b39a0c2900d3117bf7.tar.bz2 |
Rename tui_suppress_output
This patch renames tui_suppress_output to the more descriptive
tui_batch_rendering. This code was never really correct, and was
based on a misunderstanding of the curses API. The updated comments
describe the intended use of this class.
This also removes the erroneous tui_win_info::no_refresh.
wnoutrefresh does not prevent any output; rather, it copies from one
curses buffer to another but (unlike woutrefresh) without then
flushing to the screen.
tui_batch_rendering now works in the correct way: calling doupdate in
the destructor of the outermost instance, thus batching all screen
output until that point.
The patch adds instantiations of tui_batch_rendering to various spots,
to make sure it is active when refreshing.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-tui.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c index 3bcd02d..b3544c6 100644 --- a/gdb/python/py-tui.c +++ b/gdb/python/py-tui.c @@ -180,6 +180,8 @@ tui_py_window::~tui_py_window () void tui_py_window::rerender () { + tui_batch_rendering batch; + tui_win_info::rerender (); gdbpy_enter enter_py; @@ -206,6 +208,8 @@ tui_py_window::rerender () void tui_py_window::do_scroll_horizontal (int num_to_scroll) { + tui_batch_rendering batch; + gdbpy_enter enter_py; if (PyObject_HasAttrString (m_window.get (), "hscroll")) @@ -220,6 +224,8 @@ tui_py_window::do_scroll_horizontal (int num_to_scroll) void tui_py_window::do_scroll_vertical (int num_to_scroll) { + tui_batch_rendering batch; + gdbpy_enter enter_py; if (PyObject_HasAttrString (m_window.get (), "vscroll")) @@ -242,6 +248,8 @@ tui_py_window::resize (int height_, int width_, int origin_x_, int origin_y_) void tui_py_window::click (int mouse_x, int mouse_y, int mouse_button) { + tui_batch_rendering batch; + gdbpy_enter enter_py; if (PyObject_HasAttrString (m_window.get (), "click")) @@ -258,6 +266,8 @@ tui_py_window::output (const char *text, bool full_window) { if (m_inner_window != nullptr) { + tui_batch_rendering batch; + if (full_window) werase (m_inner_window.get ()); |