changeset 2363:d7688c3ec43f

GTK4: Remove widget from dirty list during expose event.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 12 Mar 2021 22:03:50 +0000
parents 4367da529f5a
children 9ae60d8f4ea3
files gtk4/dw.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gtk4/dw.c	Fri Mar 12 20:21:48 2021 +0000
+++ b/gtk4/dw.c	Fri Mar 12 22:03:50 2021 +0000
@@ -878,6 +878,10 @@
 #ifdef DW_USE_CACHED_CR
       g_object_set_data(G_OBJECT(widget), "_dw_cr", NULL);
 #endif
+
+      /* Remove the currently drawn widget from the dirty list */
+      _dw_dirty_list = g_list_remove(_dw_dirty_list, widget);
+
       /* Copy the cached image to the output surface */
       cairo_set_source_surface(cr, g_object_get_data(G_OBJECT(widget), "_dw_cr_surface"), 0, 0);
       cairo_rectangle(cr, 0, 0, width, height);