Path: utzoo!attcan!uunet!ginosko!usc!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: setting a clip region in a shared GC Message-ID: <8909081751.AA01781@LYRE.MIT.EDU> Date: 8 Sep 89 17:51:21 GMT References: <9050@zodiac.ADS.COM> Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 20 > Which (if any) of the following statements is > correct? > > 1. A widget may alter the clip region in a shared GC. not without additional constraints. > 2. A widget may briefly alter a shared GC, but must undo any changes > it makes immediately after using them. This works just fine as long as you're single-threaded and is an acceptable approach. "Immediately after using them" should be interpreted as "before returning from the procedure which made the modification". [If you've gotten things to work in a multi-threaded environment, let us know! :-)] > 3. A widget may never alter a shared GC. Has the combinatorial problem that you point out, so the "leave-it-as-you-found-it" rule is generally to be preferred.