[vte] widget: gtk4: Don't invalidate endlessly
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: gtk4: Don't invalidate endlessly
- Date: Mon, 25 Jul 2022 20:25:34 +0000 (UTC)
commit 2d165b61f527472a7a7eccee3e94f8ec96690245
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Jul 25 22:25:08 2022 +0200
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
src/vte.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index ed99daf6..c5f35656 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]