Alessandro Levi Montalcini
C.so Re Umberto 10
10121 Torino
Italy
e-mail: LMontalcini@pmn.it
anonymous ftp: //ftp.alpcom.it/software/mac/LMontalcini

DragAnyWindow hint: windows that won't redraw

¥ Some applications don't redraw the contents of their windows when you use DragAnyWindow to move a dialog in front of them. This is NOT DragAnyWindow's fault: the Macintosh system software doesn't handle window updates behind dialogs automatically, so it is up to the application to take care of it. Every well-written application, according to Apple, should have a special little piece of code to redraw windows behind a modal dialog. In fact, you'll notice that "bad" applications show the same behavior (blank windows) if you enter a screen saver while one of their dialogs is displayed. Applications that use movable dialogs (i.e. dialogs with a title bar) usually handle updates correctly. Please note that there is no way for DragAnyWindow to correct this problem: if your favourite application is not redrawing its windows, then you should ask the author to read his Inside Mac books again...

¥ Programmer's note: if your application doesn't handle updates correctly, you should add some code to the dialog filter procedure you're passing to ModalDialog and Alert (or add a dialog filter if you're not using one yet) to take care of update events. When the filter receives an update event for a window that is not the modal dialog itself, you should call your main window update routine and have it redraw the window contents as needed.
