Path: utzoo!attcan!uunet!cs.utexas.edu!usc!apple!apple.com!chewy From: chewy@apple.com (Paul Snively) Newsgroups: comp.sys.mac.programmer Subject: Re: Window Manager Message-ID: <7643@goofy.Apple.COM> Date: 11 Apr 90 18:21:55 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 53 References:<3047@dciem.dciem.dnd.ca> <7617@goofy.Apple.COM> <17179@well.sf.ca.us> In article <17179@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster) writes: > In article <7617@goofy.Apple.COM> chewy@apple.com (Paul Snively) writes: > >In article <3047@dciem.dciem.dnd.ca> juana@dciem.dciem.dnd.ca (Juana > >Chang) writes: > >> After a dialog has been displayed over my windows, chunks of my windows > >> have been erased by the dialog. Which functions should I use to re-draw > >my > >> windows ? > >> > >> Should I use: > >> > GetPort(&savePort); > SetPort((WindowPtr) event->messaege); > >> BeginUpdate( ptr_mywindow ); > >> re-draw window... > >> EndUpdate( ptr_mywindow ); > SetPort(savePort); > >> > >> ????? > > > >Yes. > > > That is not quite fair. A better answer would be that you should have code like > that in your update event handler, and that if you are not calling your > main event handler because you are stuck in some modal dialog, you should > pass ModalDialog() or Alert a pointer to a filer function that checks the > event->what field of its event argument. If it is an update event and the > destination (event-.message) is not the FrontWindow(), then hand it to your > main even yhandfler to dispatch to the appropriate window. > -- > -- David Phillip Oster - Note new address. Old one has gone Bye Bye. > -- oster@well.sf.ca.us = {backbone}!well!oster Oops. You're unquestionably right. I was (most likely erroneously) reading the post to mean "how do I update the blotched windows after the dialog has been dismissed," as opposed to "how can I avoid ugly un-updated regions in cases where I don't update between having occlusions that aren't completely subsumed by successive occlusions?" (Sorry for the contorted English!) In other words, I imagine that I misinterpreted the question. Given the second interpretation of the question, your answer is indeed the correct approach. __________________________________________________________________________ Paul Snively Macintosh Developer Technical Support Apple Computer, Inc. 1st Choice: Paul_Snively.DTS@gateway.qm.apple.com 2nd Choice: CHEWBACCA@applelink.apple.com Last Choice: chewy@apple.com Just because I work for Apple Computer, Inc. doesn't mean that I believe what they believe, or vice-versa. __________________________________________________________________________