From: Matt Birkholz Date: Fri, 16 Sep 2011 18:50:55 +0000 (-0700) Subject: Re-use PangoLayouts cached for destroyed text-widgets. X-Git-Tag: mit-scheme-pucked-9.2.12~366^2~99 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=249465c784a4f7f941790efbf547770289f3906b;p=mit-scheme.git Re-use PangoLayouts cached for destroyed text-widgets. --- 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))