Subject: Re: Hypercube in lisp (newbie)
From: rpw3@rpw3.org (Rob Warnock)
Date: Thu, 25 Aug 2005 22:31:52 -0500
Newsgroups: comp.lang.lisp
Message-ID: <95adndaHooa1EJPeRVn-uw@speakeasy.net>
Paul Foley  <see@below.invalid> wrote:
+---------------
| Rob Warnock wrote:
| > Or perhaps was your pop-up window covered when you did the DRAW-POLYGON
| > call? Remember, Pascal's example is *very* simple code, and does not
| > contain an exposure event handler...
| 
| > [Then drag another window across part of your nice polygon, and
| > watch it get erased...  ;-}  ...until you call DRAW-POLYGON again.]
| 
| A simple solution to that problem is just to add :BACKING-STORE T to
| the CREATE-WINDOW call.
+---------------

First, "T" doesn't appear to be a valid argument to :BACKING-STORE,
at least, not with the CLX that comes with CMUCL-19a:

	> (decribe'xlib:create-window)
	...
	(:BACKING-STORE (MEMBER NIL :NOT-USEFUL :WHEN-MAPPED :ALWAYS))
	(:BACKING-PLANES (OR NULL (UNSIGNED-BYTE 32)))
	(:BACKING-PIXEL (OR NULL (UNSIGNED-BYTE 32)))
	(:SAVE-UNDER (MEMBER NIL :ON :OFF))
	...
	> 

Next, I tried both ":BACKING-STORE :WHEN-MAPPED" and ":BACKING-STORE :ALWAYS"
and neither helped. Does something more need to be done with :BACKING-PLANES
and/or :BACKING-PIXEL and/or :SAVE-UNDER?

Note: AFAIK, an X Server is *NOT* required to honor :BACKING-STORE,
and most won't if they can't do it cheaply.

Anyway, the real solution is an XLIB:EVENT-CASE loop with an :EXPOSURE
handler...


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607