XftFontDescription.st
changeset 6200 8f0d25eec888
parent 6199 2a683b1824c6
child 6201 ecc94ff4e5e9
--- a/XftFontDescription.st	Fri Jan 10 12:16:16 2014 +0100
+++ b/XftFontDescription.st	Mon Jan 13 01:39:28 2014 +0100
@@ -1382,14 +1382,41 @@
     "Modified: / 29-12-2013 / 21:16:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!XftFontDescription methodsFor:'release'!
+
+releaseDrawIfAssociatedWith: view
+
+    | drawableId |
+
+    view isNil ifTrue:[ ^ self ].
+    drawableId := view id.
+    drawableId isNil ifTrue: [ ^ self ].
+%{
+#ifdef XFT
+    XftDraw *draw;
+    if ( __INST(drawId) != nil ) {
+        if ( XftDrawDrawable ( XFT_DRAW ( __INST(drawId) ) ) == DRAWABLE( drawableId ) ) {
+            XftDrawDestroy( XFT_DRAW( __INST(drawId) ) );
+            __INST(drawId) = nil;
+        } 
+    }
+    RETURN ( self );
+#endif
+%}.
+    self primitiveFailed
+
+    "Created: / 12-01-2014 / 19:48:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-01-2014 / 22:09:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !XftFontDescription class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.20 2014-01-10 11:16:16 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.21 2014-01-13 00:39:28 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.20 2014-01-10 11:16:16 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.21 2014-01-13 00:39:28 vrany Exp $'
 ! !