[racket] GUI does not paint while window is resizing on Windows XP

From: Jeff C. Britton (jcb at iteris.com)
Date: Thu Dec 1 22:35:24 EST 2011

I finally had a chance to look at this again.
If I hold onto a corner and keep dragging it, eventually it appears that an event is missed and then the window can be resized without painting taking place.  You need to keep dragging the corner for 30 seconds to a couple of minutes.  

I might not have noticed except I thought the reaction of painting to dragging seemed a little slow, so I kept dragging to evaluate the situation.

Is it possible for the user to handle the window size event?

Contrary to what I said last time, I think it would be better for the user to perform the redraw on this event.  This way the user can modify the screen layout based upon the new size before drawing.  Perhaps there is a layout manager to do this, but then again I think the user should be in control of the layout at this point.  One could invoke a layout manager to do the layout or just roll your own layout on the event.

Windows User32.dll provides an option for a background brush.  If set, the background is painted automatically.  If not set, the user must always draw the background.  I actually prefer the latter all the time.

If DrRacket simply provides drawing and events, then the user is free to create whatever he wants.  Beyond that a GUI toolkits first goal should be to not get in the way of the above. 

I used DrRacket version 5.2.0.4 built 11/30/2011 on
Windows XP SP3.

Thanks,
Jeff Britton


At Tue, 15 Nov 2011 19:05:04 +0000, "Jeff C. Britton" wrote:

> I just started looking at Racket yesterday. I am running Racket
> version 5.1.3 on Windows XP. I started playing with GUI toolkit and I
> noticed right away that the GUI does not repaint itself while a
> window is being resized. [...]

> Is this a bug?

[Mathew Flatt wrote]
I've pushed a fix for the next version.

> Is there a workaround?

Unfortunately, I don't see a workaround for the current version.




Posted on the users mailing list.