Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!bloom-beacon!apple!tecot From: tecot@Apple.COM (Ed Tecot) Newsgroups: comp.sys.mac.programmer Subject: Re: MultiFinder and the event mask Message-ID: <15452@apple.Apple.COM> Date: 12 Aug 88 06:05:20 GMT References: <3469@polya.Stanford.EDU> Reply-To: tecot@apple.com.UUCP (Ed Tecot) Organization: Apple Computer Inc, Cupertino, CA Lines: 23 In article <3469@polya.Stanford.EDU> rothberg@polya.Stanford.EDU (Edward Rothberg) writes: >I've also become convinced that MultiFinder doesn't deal with the foreground >application's event mask properly. I have an application where I need to >receive keyUp events. I call SetEventMask() with the appropriate parameter. >My application works perfectly with UniFinder, and it works just fine when >I'm running alone (just it and the Finder) in MultiFinder. However, when I >start up another application in the background, the foreground application >starts losing keyUp events. My guess as to what's happening is that my >application is getting switched out, and MultiFinder is substituting the >background application's event mask for mine. Anyone know what's going on and >how to get around it? The system event mask is a system property, not an application property. The reson for this is that the event mask gets applied when the event is posted, not retrieved. Its use really does not entirely make sense in the MultiFinder environment. However, to answer your question, MultiFinder does not switch the system event mask for each application. Chances are that the application you launch sets the system event mask itself. Setting the event mask on every resume event and restoring it on every suspend event may prove to be a workable solution. _emt