diff options
author | Alexander Mikhaylenko <alexm@gnome.org> | 2022-07-25 22:25:08 +0200 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2022-07-25 22:25:08 +0200 |
commit | 2d165b61f527472a7a7eccee3e94f8ec96690245 (patch) | |
tree | 4b3a2d57105e41c65e76bd09ecd881e3e5dadfe5 | |
parent | 6beb9246d84d3161e1ea377417d0a2b9a8fb1e90 (diff) | |
download | vte-2d165b61f527472a7a7eccee3e94f8ec96690245.tar.gz |
widget: gtk4: Don't invalidate endlessly
Have early returns to skip invalidation like in the gtk3 codepath.
Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2566
-rw-r--r-- | src/vte.cc | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -10558,10 +10558,10 @@ catch (...) bool Terminal::invalidate_dirty_rects_and_process_updates() { -#if VTE_GTK == 3 if (G_UNLIKELY(!widget_realized())) return false; +#if VTE_GTK == 3 if (G_UNLIKELY (!m_update_rects->len)) return false; @@ -10584,6 +10584,9 @@ Terminal::invalidate_dirty_rects_and_process_updates() cairo_region_destroy (region); #elif VTE_GTK == 4 + if (G_UNLIKELY(!m_invalidated_all)) + return false; + invalidate_all(); gtk_widget_queue_draw(m_widget); #endif |