On Tue, May 2, 2017 at 7:27 PM, tim Rowledge <tim@rowledge.org> wrote:
This is mostly a problem when the OS window drawing code is in a separate thread; if the VM is doing a GC and the window is moved on-screen the OS will send some event about the move, the thread will try to read the partly-processed Display values, they will be … odd… and strange things will happen.

Well it should "just" be a visual glitch. Unless the bitmap is pinned, the GC could move it during the copy-to-screen, even if you grab the pointer right before.

So how about simply fixing it up after the copy-to-screen? Save display/bitmap oop before, compare afterwards, and if changed, just draw again.

- Bert -