From 249465c784a4f7f941790efbf547770289f3906b Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 16 Sep 2011 11:50:55 -0700 Subject: [PATCH] Re-use PangoLayouts cached for destroyed text-widgets. --- src/gtk-screen/gtk-screen.pkg | 2 +- src/gtk-screen/gtk-screen.scm | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gtk-screen/gtk-screen.pkg b/src/gtk-screen/gtk-screen.pkg index dfadd16a9..f1893466f 100644 --- a/src/gtk-screen/gtk-screen.pkg +++ b/src/gtk-screen/gtk-screen.pkg @@ -108,7 +108,7 @@ USA. gobject-alien gobject-unref! gdk-window-process-updates - gtk-object-destroy + gtk-object-destroyed? gtk-object-destroy gtk-widget? gtk-widget-parent gtk-widget-grab-focus diff --git a/src/gtk-screen/gtk-screen.scm b/src/gtk-screen/gtk-screen.scm index 1289ec1cb..f87fa65f6 100644 --- a/src/gtk-screen/gtk-screen.scm +++ b/src/gtk-screen/gtk-screen.scm @@ -2362,8 +2362,10 @@ USA. (if (or (eq? old #f) (every (let ((old-extent (fix-ink-extent old))) (lambda (widget) - (not (fix-rect-intersect? - old-extent (fix-layout-view widget))))) + (or (gtk-object-destroyed? widget) + (not (fix-rect-intersect? + old-extent + (fix-layout-view widget)))))) widgets)) (let ((layout (cache-layout cache))) (if old (set-line-ink-cached-pango-layout! old #f)) -- 2.25.1