[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

425.0. "Help. Uncooperative Window Manager" by SPRITE::MILLER () Thu Mar 16 1989 17:14

    I'm trying to install a 256 location colormap and set input focus, so
    the picture comes up for the user with the correct colors.
    
    Using Xilb/Ultrix, and the window manager is fighting me all the way.
    
    No matter what I do, it insists on reinstalling the default colormap.
    Mine flashes on the screen and then the default colormap appears.
    
    The only way I can get it to work is to click on that window and
    then the NEXT time I run the program XSetInputFocus takes effect and
    displays my colormap. (I've set Xwmh .input = False)
    
    nit) WM wont give me colormap locations 254,255. I sort of got around
    that.
    
    Any help appreciated?
    
    Fred
    

T.RTitleUserPersonal
Name
DateLines
425.1Nosome stuffMELTIN::dickSchoeller - Xperimenting with XnotesFri Mar 17 1989 08:5717
Fred,

The ICCCM says that you should not try to install your color map.  Instead
the WM is supposed to do it for you.  The reason is so that the WM can
control installing the color map for the client that currently has the
"color focus".  The color focus generally goes along with the input focus.
Afterall, friendly clients do not cause interference when they are not
"active"  8^{).

On the issue of try to get 256 colors, _X_Window_System_C_Library_and_
_Protocol_Reference_ explicitly states that 2 colors will be allocated
by the system for BlackPixel and WhitePixel.  If you can guarantee what
RGB value is in those 2 pixels, you can work around them but can't allocate
them "writeable".

Dick

425.2Use XSetWindowColormapRICKS::ANTONELLIMark AntonelliFri Mar 17 1989 10:419
    Try using XSetWindowColormap which will modify the colormap attribute
    of the window structure.  The window manager will know about this
    and will typically install your colormap when your window gets focus.
    
    Mark
    
    (You could also use XChangeWindowAttributes or specify the colormap
    in the XSetWindowAttributes structure passed to XCreateWindow.) 

425.3ClarificationDECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Fri Mar 17 1989 12:4611
re .1:  I may have thought you said something different
than you did, but only the DEFAULT colormap has
BlackPixel and WhitePixel pre-allocated.  Others do not.
Of course on a VSII/GPX, the last two colors of the
colormap are reserved in hardware for the cursor colors.
In this case, the default colormap also has these
preallocated, although we do let you take them over in
a non-default colormap.

Burns

425.4oops...MELTIN::dickSchoeller - Xperimenting with XnotesFri Mar 17 1989 13:224
my mistake.  I knew that they were being taken and mistook why.

Dick

425.5Is this a limitation of dwm?SPRITE::MILLERFri Mar 17 1989 13:3111
    Thanks for the replys, but what I think I'm hearing is,
    while using dwm, it's not possible to bring up a window that has focus
    and the proper colormap installed. Relieable.
    
    I want this client to be "Friendly" and show the user the correct color
    image, and not require the user to click on that window, in order to
    view the true colors.
    
    Fred
    

425.6PSW::WINALSKIPaul S. WinalskiSun Mar 19 1989 15:5513
RE: .5

I guess friendliness is in the eye of the beholder...

If I were running your application, I'd be pretty damn annoyed when it came
up and zorked all the colors in the windows I was actively talking to at the
moment.

Bottom line:  it is up to the window manager that the user has chosen to
enforce color policy.

--PSW