Re-use PangoLayouts cached for destroyed text-widgets.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Fri, 16 Sep 2011 18:50:55 +0000 (11:50 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Fri, 16 Sep 2011 18:50:55 +0000 (11:50 -0700)
src/gtk-screen/gtk-screen.pkg
src/gtk-screen/gtk-screen.scm

index dfadd16a95ee8c8536a0d395b34266d36a49eb7e..f1893466fdee0e7e5f1e9260b35d09a4cb475127 100644 (file)
@@ -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
index 1289ec1cb6e9f5d1b0a55965415488fc903d13f9..f87fa65f6eed78fdf92d14d6c960835f80391c49 100644 (file)
@@ -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))