[mcclim-cvs] CVS mcclim/Backends/gtkairo
dlichteblau
dlichteblau at common-lisp.net
Tue May 2 13:02:09 UTC 2006
Update of /project/mcclim/cvsroot/mcclim/Backends/gtkairo
In directory clnet:/tmp/cvs-serv26810
Modified Files:
clim-fix.lisp
Log Message:
... and this turned out to be a similar but unrelated display glitch:
* clim-fix.lisp (handle-repaint): Restored the first version of this
method form Gilbert's original clim-fix.lisp, which draws background ink
before each repaint. Doesn't seem elegant, but DEMODEMO wants it.
--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/clim-fix.lisp 2006/04/30 09:24:40 1.3
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/clim-fix.lisp 2006/05/02 13:02:09 1.4
@@ -24,8 +24,20 @@
;;; :design design)
;;; (call-next-method))
-(defmethod clim:handle-repaint :after ((s clim:sheet-with-medium-mixin) r)
- (medium-force-output (sheet-medium s)))
+(defmethod clim:handle-repaint :around ((s clim:sheet-with-medium-mixin) r)
+ (let ((m (clim:sheet-medium s))
+ (r (clim:bounding-rectangle
+ (clim:region-intersection r (clim:sheet-region s)))))
+ (unless (eql r clim:+nowhere+)
+ ;; Test case: Start CLIM-DEMO::DEMODEMO and watch the header string.
+ ;; At the beginning, the text is nicely antialiased. Then start any
+ ;; demo and move the new window around over the header. As the
+ ;; header gets exposed again, the text is apparently redrawn
+ ;; multiple times and looks like crap. This fixes it:
+ (clim:with-drawing-options (m :clipping-region r)
+ (clim:draw-design m r :ink clim:+background-ink+)
+ (call-next-method s r)))
+ (medium-force-output m)))
;; cairo hack: adjust rectangle coordinates by half a pixel each to avoid
;; anti-aliasing (and follow-up output artifacts)
More information about the Mcclim-cvs
mailing list