[plt-scheme] SGL app flashes when it changes canvases

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Nov 2 07:27:47 EST 2008

At Sun, 02 Nov 2008 01:50:47 -0800, Ben Goetter wrote:
> Environment: 4.1.2 [3m], Windows XP (and Vista), various GPUs
> 
> When the following application changes canvases (on any mouse 
> button-down or -up), its window flashes white or partly-white briefly, 
> despite my best efforts via change-children.   How can I prevent it from 
> flashing so?

Although we might be able to improve `begin-container-sequence' so that
it suppresses more low-level window updates, I think it will be
difficult.

> (The obvious solution is never to change canvases.  This is a greatly 
> distilled version of a larger application that keeps very different UI 
> logic in its two canvases.  I would prefer to maintain that structure if 
> I can.)

The `surrogate' form of `scheme/surrogate' can help you delegate canvas
methods to a surrogate object. Most of the work is simply listing the
methods that you need to be delegated, and then deriving new classes
from the generated surrogate class instead of from `canvas%'. Then you
can switch surrogates instead of switching canvases.


Matthew



Posted on the users mailing list.