From a069b03c7030f0668be99cdd09dd9d30ac20f026 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jacek=20TeMPOraL=20Z=C5=82ydach?= <temporal.pl@gmail.com>
Date: Mon, 31 Jul 2017 20:31:10 +0200
Subject: [PATCH] Marked places with (possibly) ugly cache invalidation hack.

See issue #14.
---
 silica/mirror.lisp | 1 +
 silica/sheet.lisp  | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/silica/mirror.lisp b/silica/mirror.lisp
index 2827d0c0..8148b808 100644
--- a/silica/mirror.lisp
+++ b/silica/mirror.lisp
@@ -112,6 +112,7 @@
 (defmethod sheet-device-region ((sheet sheet-transformation-mixin))
   (let ((region (sheet-cached-device-region sheet)))
     ;; We decache the device region by setting this slot to NIL...
+    ;; What the hell... now we have to track how this NIL is slipping through to CLX-CLIM::COMPUTE-GCONTEXT-CLIP-MASK (CLX-CLIM::CLX-MEDIUM) -- jacek.zlydach 2017-07-31
     (cond ((or (eq region +nowhere+)		    ;it can happen
 	       (and region (slot-value region 'left)))
 	   region)
diff --git a/silica/sheet.lisp b/silica/sheet.lisp
index f27dc457..6b1ce1b9 100644
--- a/silica/sheet.lisp
+++ b/silica/sheet.lisp
@@ -323,7 +323,7 @@
     (when region
       (if (eq region +nowhere+)                        ;it can happen...
           (setf (sheet-cached-device-region sheet) nil)
-          (setf (slot-value (sheet-cached-device-region sheet) 'left) nil)))))
+          (setf (slot-value (sheet-cached-device-region sheet) 'left) nil))))) ;FIXME UGLY HACK? -- jacek.zlydach 2017-07-31
 
 (defmethod invalidate-cached-regions :after ((sheet sheet-parent-mixin))
   ;;--- In theory if this sheet has a mirror we don't need to do any more
@@ -343,7 +343,7 @@
     (when region
       (if (eq region +nowhere+)                        ;it can happen...
           (setf (sheet-cached-device-region sheet) nil)
-          (setf (slot-value (sheet-cached-device-region sheet) 'left) nil))))
+          (setf (slot-value (sheet-cached-device-region sheet) 'left) nil)))) ;FIXME UGLY HACK? -- jacek.zlydach 2017-07-31
   (setf (sheet-cached-device-transformation sheet) nil))
 
 (defmethod invalidate-cached-transformations :after ((sheet sheet-parent-mixin))
-- 
GitLab