]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Prevent flickering when redrawing the TUI python window
authorHannes Domani <ssbssa@yahoo.de>
Tue, 22 Dec 2020 14:02:47 +0000 (15:02 +0100)
committerHannes Domani <ssbssa@yahoo.de>
Mon, 24 May 2021 15:16:44 +0000 (17:16 +0200)
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/ChangeLog:

2021-05-24  Hannes Domani  <ssbssa@yahoo.de>

* python/py-tui.c (tui_py_window::refresh_window):
Avoid flickering.

gdb/ChangeLog
gdb/python/py-tui.c

index 480d204232a6d054bd16361cc05fd8a744712c03..b24a24be267d48df3500654085c3200d4f7db032 100644 (file)
@@ -1,3 +1,8 @@
+2021-05-24  Hannes Domani  <ssbssa@yahoo.de>
+
+       * python/py-tui.c (tui_py_window::refresh_window):
+       Avoid flickering.
+
 2021-05-23  Tom de Vries  <tdevries@suse.de>
 
        PR tdep/27822
index 72e9c0d5e2b11e065b24da66a9a4b2df9ad287c9..22f4b0ffd43afebb08013ad4301a29114e7ab3fd 100644 (file)
@@ -91,12 +91,14 @@ public:
 
   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 ();
   }
 
   /* Erase and re-box the window.  */