jelarcic@csusac.csus.edu (Mikey Jelarcic) (06/17/90)
Hi, I have a few questions that I hope somebody can answer, I'm using VMS 5.2 and DECwindows 2.0 (I believe 2.0, I never really checked for sure yet). 1) Is there some way to get a modal popup dialog box to have window manager decorations, like title bar, pushback button, etc, and the ability to move it it around? (sorta like a modeless pdb but modal in focus issues) 2) how can I get access/use the watch cursor that DEC programs use? (this question has been answered before but I don't remember that answer that was posted). 3) Now for da biggie... all my company's applications use only 16 colors and it needs to draw sometimes using xor, on systems with more than 4 planes this has posed a problem since (to my understanding) the function is a manipulation of the pixel value. I called XAllocColorCells() with 4 planes and 1 pixel and got the necessary configuration to do xor drawing. the problem I now face is that we have several "secondary" products you can run with our main product. I cannot call XAlloc..() every time someone starts up another application because I could run out of colormap entries (the code for 4 plane systems alloc a colormap but I'd rather not for 8+ plane systems). What I did is when an app starts up it checks for a special Atom owned by the root window (which will contain the plane/pixel value returned by XAlloc..(), more on this later), use its value to generate colormap entry numbers and then does a sanity check to make sure those entires contain the correct rgb values. If it passes the sanity check it will do success XAlloc..() to try and get values to correspond to the atom value (more on why I do this when I finally state the problem) Now when an app starts up and the atom is undefined or it doesn't pass the sanity check it will do an XAlloc...() and create/set the Atom. The problem that can occur in this mess it that you start up the first app, it allocs the color entries and sets the atom, you start up app #2, it gets the atoms, passes the sanity test but doesn't alloc the entries (app #1 has them). now app#1 exits and we have unallocated entries being used, unsocially I might add, by app #2. sigh... this whole kludge and it's "feature" are brought on by the need for several applications to share colormap entries, and for those entries to be allocated by someone/something as long as one of those applications is running, and the entries must be in the necessary configuration to do xor drawing. I considered the XCloseDownMode() but couldn't figure out the XID(s) I needed (do cmap entires have any?). This is all I could think of before the beta release deadline (yes this kludge exists out there in the "real world", scary ain't it). Or am I way off base here and should stick to graphics that I can create with crayons in a padded cell? Sorry the last question was so long winded (sorry no source for that one my boss would have a fit, not that our X source does anything original). I'll probably be porting all this stuff to Motif as soon as I finish porting one last application to X, so any pointers on the above questions under Motif would be helpful also. Thanx for listening and mucho thanx for any help you can give me. mikey -- Michael L. Jelarcic ..!csusac!jelarcic "Who said what?!? Never heard of him, go away." - my employer