Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!amdahl!apple!tecot From: tecot@Apple.COM (Ed Tecot) Newsgroups: comp.sys.mac Subject: Re: Dual Video Card Problem Message-ID: <9450@apple.Apple.Com> Date: 9 May 88 22:48:13 GMT References: <4WSbwyy00XoCMPY0Mi@andrew.cmu.edu> <4515@husc6.harvard.edu> Reply-To: tecot@apple.UUCP (Ed Tecot) Organization: Apple Computer Inc, Cupertino, CA Lines: 54 [ The following is from Art Cabral, who wrote the Palette Manager. ] Here are some thoughts in response to Eric Olson's comments on explicitly ordered indexes, the Palette Manager, and the Color Manager. (Nice explanation, Eric; your analysis was very good.) Here are a couple of tricks Eric didn't mention that are not well tested but which should work. First, it is possible (although clumsy) to arrange for explicit indexes on each device and still use the Palette Manager model. To start with, when your application becomes active (under MultiFinder or SingleFinder) call the Color Manager routine SetEntries to set an explicit color environment on each device where your window(s) are drawn. You'll have to do some work to figure this out, namely by intersecting the device rects with your window's global portRect. We consider it discourteous to simply change all device's color tables whether your window uses them or not. Then, make sure the palette in your window exactly matches the ordering of the 'clut' you used in the SetEntries calls. Then force an ActivatePalette on your window. The Palette Manager will examine each of the devices and discover that the environment is sufficient and not cause any changes, so your indexes end up in the right order and everyone is happy, right? Almost. You've lost updates in the background. This is a problem when you are running under MultiFinder. The trick is to get the Palette Manager to generate the updates for you. So, during the SetEntries call, use a 'clut' that is almost correct, say one color (not black or white) is just a few insignificant bits away from what you need, and let the Palette Manager correct that for you, causing updates for everyone else on that device that needs them. This requires using a palette that has all entries pmTolerant with tolerance of 0. Make sure your 'clut' keeps white at entry 0 and black as the last entry or Color QuickDraw will exhibit some strange behavior. Also, try to avoid using two colors which match exactly, especially white or black. We hope to provide an alternate, more straightforward method for generating this sort of behavior, but it requires some changes in the Window Manager so you won't see it in the immediate future. At the same time we hope to provide a better method of palette prioritization so the same scheme will work when devices of different depths are encountered. Stay tuned to a system disk near you. In addition, stay on the lookout for a TechNote from MacDTS which describes many interesting changes and additions to the Palette Manager (such as the Application Palette and the routine CopyPalette). [ End of Art's comments ] >There are other problems with multiple screens: the most annoying is that >Pop-Up menus ALWAYS appear on the screen with the MenuBar. Apparently the >Menu Manager doesn't know how to deal with multiple screens. It does now. This has been fixed for System 6.0. _emt