[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2761.0. "can I make firefox and VS2000 both work with colors?" by HANNAH::OSMAN (see HANNAH::IGLOO$:[OSMAN]ERIC.VT240) Tue May 15 1990 11:17

I'm trying very hard to make my TEK emulator run on both firefox AND other
workstations.

I'm having an awful time with colormaps and was hoping someone might shed
some light on the subject.

I create my shell with

	shell = XtInitialize (...);

Then I get its window with

	shell_window = XtWindow (shell);

I have my own pseudocolormap.  In order to have this colormap prevail
when it is supposed to, I used to say

	XSetWindowColormap (shell_window, my_colormap);

But that gave errors on firefox workstation, presumably because the
shell_window was created originally with a 24-plane colormap, and I'm trying
to set it to my 8-plane pseudo colormap.

So, to attempt to fix this, I took out the XSetWindowColormap completely,
and instead, I respond to FocusIn events on my window by saying

	XInstallColormap (screen, my_colormap);

This seems to work fine on the firefox, but now weird things happen back
on my 4-plane VS2000.

What happens is that the colors flash back and forth many times as though
the window manager or toolkit is fighting with my program for the colormap.

Is there a way I can make this work on both kinds of workstations ?


Thanks.

/Eric
T.RTitleUserPersonal
Name
DateLines
2761.1DECWIN::FISHERPrune Juice: A Warrior's Drink!Tue May 15 1990 14:2417
The window manager IS fighting with you.  It does not like it when you uninstall
the colormap that it believes should be installed.  Don't install the colormap
yourself.

Chances are the problem on the FF is just what you said.  What you need is the
ICCCM property for window colormaps.  It tells the wm to install a certain cmap
when that window is selected regardless of the window attribute.  Of course, the
XUI wm does not support this, so you need MWM. 

The other thing is to try to convince the toolkit to use an 8-plane pseudo
window.

And finally, you could bite the bullet just figure out which mode is the right
one based on the depth and visual of the shell window and on how many colormaps
the display has.

Burns
2761.2but I want both firefox and non-firefox to work.HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue May 15 1990 15:0323
    
Thanks Burns.

I gather from what you say that doing ICCCM property won't help since regular
DECwindows window manager (which of those letters you mentioned is *that*
window manager?) won't honor it anyway.

Have you any idea *how* I would convince toolkit to use an 8-plane pseudo
window, or whom I might talk to about this ?

My current solution (please comment) is to look at the depth and type of visual
that the toolkit has associated with the shell, and set flag VISUALS_MATCH_FLAG
iff this visual matches the one I use for my own tek colormap.

Then, if VISUALS_MATCH_FLAG is set, I do XSetWindowColormap to set shell
window's colormap to be the tek one.  WHen I get FocusIn event, if
VISUALS_MATCH_FLAG is *not* set, I do XInstallColormap of the tek colormap.

How does this sound ?  If bad, what do you suggest.

Thanks.

/Eric
2761.3DECWIN::FISHERPrune Juice: A Warrior's Drink!Tue May 15 1990 18:3031
>I gather from what you say that doing ICCCM property won't help since regular
>DECwindows window manager (which of those letters you mentioned is *that*
>window manager?) won't honor it anyway.

XUI is the name of the interface that DECwindows currently uses.  It will be
changing to Motif in DW V3.0, so it depends on the time frame of the emulator
whether you can use it or not.

>Have you any idea *how* I would convince toolkit to use an 8-plane pseudo
>window, or whom I might talk to about this ?

Nope.  Try Mike Collins or Leo Treggiari.

>My current solution (please comment) is to look at the depth and type of visual
>that the toolkit has associated with the shell, and set flag VISUALS_MATCH_FLAG
>iff this visual matches the one I use for my own tek colormap.
>
>Then, if VISUALS_MATCH_FLAG is set, I do XSetWindowColormap to set shell
>window's colormap to be the tek one.  WHen I get FocusIn event, if
>VISUALS_MATCH_FLAG is *not* set, I do XInstallColormap of the tek colormap.

This will not do what you want at some point.  This is because you currently
have a coincidental situation where a workstation with a TrueColor visual
(which you can't use, I guess) also has multiple colormaps installable simultan-
eously (which is why you don't fight with the window manager on it).  Some
future h/w will have TrueColor but only one cmap, and you'll be up the creek.

You really need to either assume MWM or another compliant window manager,
or get the toolkit to do the right thing.

Burns