Re: colormaps and cursors

Dikoma C. Shungu (shungu@ultranmr.cpmc.columbia.edu)
Sat, 30 Nov 1996 11:33:14 -0500 (EST)

To subscribers of the xforms list from "Dikoma C. Shungu" <shungu@ultranmr.cpmc.columbia.edu> :

> May the cause of all these, (color flashes, abnormal change of colors etc)
> was the fact that i have an image as a background (root window) ...
> when i remove it, everything work ok. It seems that this strange behaviour
> begins when forms have few sells to allocate ... I believe that the root of
> the problem was that i displayed simultanously about 80 colors, but forms
> couldn't allocate more than about 60. Am i wright ?? Is that the cause of
> changing allready allocated colors (even FL_BLACK for example..)?
> Finally a request:
> It would be nice if there was a forms function to return the empty color
> sells, so somebody who wants to allocate many colors, to know where to
> stop, before all these happen...
> Thanks a lot !!!

If you have an 8-bit display and the *total* number of entries in all the
colormap "segments" being requested by all the applications on your desktop
exceeds 256 at any given time, your window manager will give priority to the
window under the system cursor, and deallocate other windows' colors
(as necessary.) This swapping of colormap segments is what causes the screen
to flash. For instance, running both Netscape and FrameMaker on my Sparc-10
(with an 8-bit display) causes colors of one application to be distorted when
the cursor is on the other. This does not happen on my new Sun Ultra-II which
has a 24-bit display.

Your background probably hogs up all the colors in the colormap so that none
are left for all the other applications, including your Xforms app. The window
manager tries to do the best it can to satisfy your Xforms' app request for
colors, but clearly not to your liking...

IMHO, working with colors under X is a royal pain!

DCS

----------------------------------------------------------------------------*
Dikoma C. Shungu, Ph.D. | Assistant Professor of Radiology / Medical Physics|
The Hatch NMR Research Center | The Neurological Institute of New York |
College of Physicians & Surgeons | Columbia University | 710 W 168th Street |
New York, New York 10032 | http://www.hnrc.cpmc.columbia.edu | 212-305-6986 |
----------------------------------------------------------------------------*
# # |
# # # ##### ##### ## # # # # ##### |
# # # # # # # # ## # ## ## # # |
# # # # # # # # # # # # ## # # # is |
# # # # ##### ###### # # # # # ##### UltraSparc-driven |
# # # # # # # # # ## # # # # |
##### ###### # # # # # # # # # # # Solaris-2.5.1 |
----------------------------------------------------------------------------*

To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html