author | X gate hg captive account <xhg@xserver.us.oracle.com> |
Wed, 19 Aug 2015 13:48:41 -0700 | |
changeset 1484 | bc8922b8e1d2 |
parent 907 | 3c35d611cdaa |
permissions | -rw-r--r-- |
550
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
1 |
.\" |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
2 |
.\" To print: troff -ms flash.txt |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
3 |
.\" |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
4 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
5 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
6 |
.ft B |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
7 |
.ce 3 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
8 |
======================================================================= |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
9 |
|| Colormap Compaction - A Technique for Reducing Colormap Flashing || |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
10 |
======================================================================= |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
11 |
.ft P |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
12 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
13 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
14 |
\fBA. Introduction\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
15 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
16 |
In some situations, it is beneficial to \fIcompact\fP the \fBxnews\fP default |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
17 |
colormap. This often leads to reduced \fIcolormap flashing\fP. Colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
18 |
flashing occurs when colors in two different software colormaps conflict |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
19 |
with each other. Since only one software colormap can be loaded into the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
20 |
hardware at a time, for a given pixel value you will see the color |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
21 |
which is in one colormap or the other. Which color you see depends |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
22 |
on the window into which you assign the \fIcolormap focus\fP. Typically, |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
23 |
the focus is assigned to a window by moving the pointer into it. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
24 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
25 |
This material applies only to color devices which have a single |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
26 |
hardware color LUT, such as GX. It does not apply to monochrome screens. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
27 |
The technique describe herein may be used on a device which |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
28 |
provides multiple hardware color LUTs, such as GS or GT, but it |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
29 |
is less valuable in this configuration, because the benefit will |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
30 |
probably not be as pronounced as it can be on a single hardware |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
31 |
color LUT device. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
32 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
33 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
34 |
\fBB. An Example of Colormap Flashing\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
35 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
36 |
Let us suppose we have two windows, window A and window B. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
37 |
Window A is attached to software colormap A; window B is attached to |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
38 |
software colormap B. When you move the pointer into window A, colormap A |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
39 |
will be loaded into the hardware colormap. Likewise, when you move |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
40 |
the pointer into window B, colormap B will be loaded. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
41 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
42 |
Let's say the pixel value 5 is drawn somewhere on the screen. Let's also |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
43 |
suppose that the color value for pixel 5 in colormap A is Red and |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
44 |
the color value for pixel 5 in colormap B is Blue. When the pointer is |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
45 |
in window A, all pixels of value 5 will be displayed as Red, no matter where |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
46 |
they are on the screen. When the pointer is in window B, these same pixels |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
47 |
will be displayed as Blue. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
48 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
49 |
In OpenWindows, a software colormap will only displace the other in places where they |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
50 |
each have allocated colors. In places where no colors |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
51 |
have been allocated, the contents of the hardware will remain set to the previous values. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
52 |
Thus, the colors of two software colormaps can exist harmoniously together in the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
53 |
hardware colormap only if their allocated colormap entries do not intersect. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
54 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
55 |
(Readers familiar with Sunview should note that this style of colormap management |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
56 |
is very different than the named colormap segment scheme used by Sunview.) |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
57 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
58 |
Moving the pointer rapidly back and forth between windows A and B causes |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
59 |
the pixels with value 5 on the screen to blink between Red and Blue. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
60 |
This is why this effect is called colormap \fIflashing\fP. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
61 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
62 |
The rest of this discussion will assume a basic level of familiarity |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
63 |
with X11 colormap concepts. Users should refer to O'Reilley Volume 1 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
64 |
Chapter 7 "Color" for more information. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
65 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
66 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
67 |
\fBC. Why Does Colormap Flashing Happen?\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
68 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
69 |
The previous section discussed the effects and symptoms of colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
70 |
flashing. But the fundamental question remains: what causes the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
71 |
colors in the two colormaps to coincide and conflict? |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
72 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
73 |
For the purposes of the following discussion, pixel 0 is called the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
74 |
\fIlow end\fP of the colormap and pixel 255 is called the \fIhigh end\fP. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
75 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
76 |
Because, for a typical device, a maximum of 256 distinct colors can be displayed |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
77 |
on a screen at once, colors are a very scarce resource. The X11R4 standard provides |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
78 |
some mechanisms for sharing colors between client programs, thus |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
79 |
reducing the chance of colormap flashing. For example, two different |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
80 |
applications may share the same pixel value, and therefore the same color, |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
81 |
in a single colormap. Usually, a client program has to explicitly try |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
82 |
to share colors with other clients. Some situations in which such |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
83 |
attempts break down are: |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
84 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
85 |
.in +0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
86 |
\(bu All of the clients which are running collectively demand more |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
87 |
than 256 distinct colors. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
88 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
89 |
\(bu One or more clients make no attempt at all to share colors |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
90 |
with other applications. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
91 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
92 |
\(bu One or more clients use read-write (modifiable) colors, which |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
93 |
cannot be shared. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
94 |
.in -0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
95 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
96 |
There are several techniques X11 client programmers can use to share |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
97 |
colors. Most of them entail the implementation of additional code |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
98 |
in the program. What we seek to present in this document, |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
99 |
is a generic technique that any OpenWindows user can take advantage of, |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
100 |
regardless of whether a particular program contains explicit code |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
101 |
which tries to reduce colormap flashing. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
102 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
103 |
Client programs ask the xnews server to grant them pixels to use by telling |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
104 |
the server what colors they desire. The server figures out where to |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
105 |
put the colors in the colormap and then tells the clients which pixels |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
106 |
have been assigned to them. This process is called \fIcolor allocation\fP. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
107 |
Unless client programs do something out of the ordinary, color allocations |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
108 |
tend to gravitate toward the low end of a colormap. This is because the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
109 |
server always gives a client the lowest unused pixel when allocating a |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
110 |
new color. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
111 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
112 |
The default colormap is a colormap which all clients know about and |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
113 |
can use. By default, when a window is created, the default colormap is |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
114 |
attached it. If a client allocates a color in a colormap and indicates it to be |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
115 |
\fIshareable\fP, other clients allocating the same color value are |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
116 |
able to share these colors. More sharing of colors means less color |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
117 |
conflicts and less colormap flashing. The default colormap, therefore, |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
118 |
is the preferred colormap to use if you want to share colors. Sometimes |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
119 |
a program cannot use the default colormap and must allocate its |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
120 |
colors in an alternate colormap. This increases the chances of flashing |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
121 |
between the colors in these two different colormaps. Sometimes a program wants |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
122 |
to use the default colormap, but cannot because it is full. The program is then |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
123 |
forced to use an alternate colormap. This, again, increases the chance of flashing. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
124 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
125 |
To summarize, client applications would like to use the default colormap if |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
126 |
possible, but sometimes they need to or are forced to use an alternate |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
127 |
colormap. The only way to prevent colormap flashing between two separate |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
128 |
colormaps is to make them disjoint--to ensure their color allocations not |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
129 |
intersect. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
130 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
131 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
132 |
\fBC. Types of Colormap Flashing\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
133 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
134 |
Some kinds of colormap flashing are worse than others. For example, |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
135 |
an MCAD application which flashes against a spreadsheet program |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
136 |
is unpleasant, but since the flashing is usually confined to specific |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
137 |
window areas, it can often be tolerated as a reality of limited |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
138 |
hardware. However, if the same MCAD application flashes against |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
139 |
the root window background or the frame border colors, the effect |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
140 |
is usually very pronounced. This is very disconcerting and |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
141 |
disorienting for the user. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
142 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
143 |
It is specifically this latter type of colormap flashing that the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
144 |
colormap compaction attempts to solve. Other techniques for dealing |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
145 |
with the former type of flashing exist, but they usually require |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
146 |
programming changes and, therefore, are not something the end-user |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
147 |
can typically take advantage of without having specially-modified software. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
148 |
We will therefore not deal further with this \fIwindow-to-window\fP type of |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
149 |
colormap flashing. What we |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
150 |
will proceed to address is the problem of the flashing of windows against |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
151 |
a group of colors called the \fIworkspace colors\fP. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
152 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
153 |
The workspace colors are colors which are in some way important |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
154 |
or pervasive in a user's workspace. They may be colors which |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
155 |
cover a large area on the screen or they may be colors appear |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
156 |
in frequently used applications. Some examples of applications |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
157 |
which might utilize workspace colors are: |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
158 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
159 |
.in +0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
160 |
\(bu A window manager (e.g \fBolwm\fP), for the root background, window borders, and menus. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
161 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
162 |
\(bu A toolkit (e.g. XView), for window decorations and controls. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
163 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
164 |
\(bu A root image loader (e.g. \fBxsetroot\fP), for the root background image. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
165 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
166 |
\(bu An oft-used application (e.g. \fBfilemgr\fP). |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
167 |
.in -0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
168 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
169 |
Which colors should be designated as workspace colors is left |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
170 |
up to the user. The only criteria for a workspace color is that it |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
171 |
be a read-only (sharable) color and that it be allocated in the default |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
172 |
colormap of a screen. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
173 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
174 |
To summarize, the workspace colors are the colors the user has deemed |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
175 |
to be important and with which he or she would prefer not to have |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
176 |
any colormap flashing. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
177 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
178 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
179 |
\fBD. Goals\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
180 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
181 |
\fIColormap compaction\fP takes advantage of the identification |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
182 |
of the colors of special applications and the low-end clustering effect of |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
183 |
typical applications. It takes advantage of these |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
184 |
by shoving the workspace colors up to the top of the colormap. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
185 |
In this position, there is a reduced chance of the colors flashing |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
186 |
flashing with other applications. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
187 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
188 |
It is important that it be easy to identify the workspace colors. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
189 |
Detailed knowledge of how X11 colormaps work should not be required. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
190 |
Nor should any programming ability be required. Lastly, we |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
191 |
don't want to rely on the availability of specially adapted programs; |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
192 |
the technique should work with any arbitrary program which conforms |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
193 |
to the X11 standard protocol. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
194 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
195 |
All of these considerations lead us to the method which is described |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
196 |
in the following section. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
197 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
198 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
199 |
\fBE. Instructions\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
200 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
201 |
The preceding material has been presented to give you a overall sense |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
202 |
what the problem is and the general method of solution. This section |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
203 |
will show you how to apply this method in the OpenWindows environment. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
204 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
205 |
In a nutshell, to reduce or prevent colormap flashing, you need to run the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
206 |
\fBxnews\fP server, perform some configuration steps, and then exit the server. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
207 |
The next time you run the server, the workspace colors you designate |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
208 |
will be put up at the high end of the default colormap. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
209 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
210 |
For additional details on this process, refer to \fBcmap_compact\fP(1). |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
211 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
212 |
Prerequisites: |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
213 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
214 |
.in +0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
215 |
.ti -1.5 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
216 |
\(bu Your \fL~/.xinitrc\fP file should invoke a version of |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
217 |
\fLopenwin-sys\fP that has the following as its first line: |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
218 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
219 |
.in +0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
220 |
.ft L |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
221 |
.nf |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
222 |
.na |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
223 |
cmap_compact init |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
224 |
.ft P |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
225 |
.fi |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
226 |
.ad |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
227 |
.in -0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
228 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
229 |
The \fLopenwin-sys\fP shipped with OpenWindows 3.0 contains this |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
230 |
line. If you use some other file, be sure to add this line. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
231 |
The process should never be backgrounded. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
232 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
233 |
.ti -1.5 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
234 |
\(bu Edit your \fL~/.openwin-menu\fP file and insert the following lines into the \fIUtilities\fP menu |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
235 |
after the "Save Workspace" menu entry: |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
236 |
: |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
237 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
238 |
.in +0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
239 |
.ft L |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
240 |
.nf |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
241 |
.na |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
242 |
"Save Colors" MENU |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
243 |
"Save" DEFAULT $OPENWINHOME/bin/cmap_compact save |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
244 |
"Discard" $OPENWINHOME/bin/cmap_compact discard |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
245 |
"Save Colors" END |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
246 |
.ft P |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
247 |
.fi |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
248 |
.ad |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
249 |
.in -0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
250 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
251 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
252 |
If you do not have your own customized menu file, start with a copy |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
253 |
of \fL$OPENWINHOME/lib/openwin-menu\fP placed in your home directory, renamed |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
254 |
to \fL.openwin-menu.\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
255 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
256 |
.in -0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
257 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
258 |
Steps: |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
259 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
260 |
.in 0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
261 |
.ti -2.0 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
262 |
1. Run the server with the \fBopenwin\fP(1) script. Be sure at this |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
263 |
time to configure the server for all of the screens you want to |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
264 |
compact colors for. \fBopenwin\fP will (typically) execute |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
265 |
\fI~/.openwin-init\fP, which will in turn bring up your initial |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
266 |
tools and programs. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
267 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
268 |
.ti -2.0 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
269 |
2. If you use a program which loads a root background image (such as |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
270 |
\fBxsetroot\fP(1)), make sure you run this program. Do this for |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
271 |
every screen. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
272 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
273 |
.ti -2.0 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
274 |
3. Use the \fIWorkspace Properties\fP sheet to select your desired |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
275 |
window border and/or root window background colors. This property |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
276 |
is available by selecting the \fIProperties\fP entry of the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
277 |
root menu. Do this for every screen. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
278 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
279 |
.ti -2.0 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
280 |
4. Choose the applications whose colors you want to designate as |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
281 |
workspace colors. You do this by either quitting undesired |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
282 |
applications which are on the screen or by running desired |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
283 |
applications which are not yet on the screen. Do this for |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
284 |
every screen. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
285 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
286 |
.ti -2.0 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
287 |
5. At this point, the only colors which are in the default colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
288 |
should belong to the displayed programs. Go into the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
289 |
\fIUtilities\fP submenu of the root menu of any screen and select the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
290 |
\fISave Colors\fP entry. All sharable (read-only) |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
291 |
colors in the default colormaps for all screens will be recorded and stored in |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
292 |
the file \fI~/.owcolors\fP. Note: private (read-write) colors used |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
293 |
by any of these applications will be ignored and will not |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
294 |
be saved. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
295 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
296 |
.ti -2.0 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
297 |
6. Exit the window system. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
298 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
299 |
.ti -2.0 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
300 |
7. Reenter the window system by rerunning \fIopenwin\fP. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
301 |
.in -0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
302 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
303 |
When you reenter the window system, the colors that have |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
304 |
been stored in \fI~/.owcolors\fP are placed at the high |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
305 |
end of the default colormap. Since this is done before |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
306 |
any of the other applications are started, when these |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
307 |
applications are finally started, they will find the colors |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
308 |
they want waiting for them at the high end and will use |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
309 |
them there. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
310 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
311 |
Note: If you decide to change any of the workspace colors, you should |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
312 |
repeat steps 3-7. Otherwise, you may end up with more colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
313 |
flashing. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
314 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
315 |
If, at any time, you wish to undo the effects of the colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
316 |
compaction, select the \fIDiscard\fP entry of the \fISave Colors\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
317 |
submenu. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
318 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
319 |
As a side-effect of colormap compaction, the NeWS color cube in the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
320 |
StaticColor colormap gets shifted downward. The cube is shifted down by |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
321 |
the number of workspace colors you have saved (actually, the number |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
322 |
of colors for the screen with the most colors). This is done to avoid |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
323 |
flashing between NeWS windows and the workspace colors. Note: the base |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
324 |
of the color cube is never shifted lower than pixel 0. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
325 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
326 |
The black and white pixels which are pre-allocated in the default colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
327 |
by the server are shifted up to the high end of the colormap. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
328 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
329 |
In addition, XGL (version 2.0 and greater) will recognize that |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
330 |
colormap compaction has been turned on and will adjust its |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
331 |
color cube accordingly. XGL usually allocates its color cube |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
332 |
at the high end of its colormap by default. When colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
333 |
compaction is turned on, XGL will allocate its color cube at |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
334 |
the low end of the colormap. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
335 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
336 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
337 |
\fBF. What if Colormap Flashing isn't Reduced?\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
338 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
339 |
Colormap compaction is a heuristic technique: it is not always effective |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
340 |
in reducing colormap flashing and, in some situations, may actually |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
341 |
increase colormap flashing. The result of using colormap compaction |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
342 |
is highly dependent on the applications you use and the way that you |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
343 |
have configured color on your desktop. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
344 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
345 |
Here are some example situations in which colormap compaction does |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
346 |
not succeed: |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
347 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
348 |
.in +0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
349 |
.ti -1.5 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
350 |
\(bu If you are running a program which allocates |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
351 |
its colors at the high end of a non-default colormap on purpose, |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
352 |
this program will end up flashing more with the workspace colors. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
353 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
354 |
.ti -1.5 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
355 |
\(bu If you select a large amount of workspace colors, the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
356 |
NeWS color cube may be shifted down enough to start |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
357 |
flashing more with X11 applications allocating their |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
358 |
colors at the low end. This may increase colormap flashing |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
359 |
between X11 and NeWS applications. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
360 |
.in -0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
361 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
362 |
In general, the amount of colormap flashing reduction or |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
363 |
increase afforded by colormap compaction is highly dependent |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
364 |
on the set of applications you run in your environment. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
365 |
For many environments, colormap compaction will be useful. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
366 |
But there are some environments for which it is not. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
367 |
The best policy is to give it a try and see if it helps. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
368 |
If it does not help, turn it off by selecting discard on |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
369 |
the "Save Colors" menu. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
370 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
371 |
Some other things to be aware of: |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
372 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
373 |
.in +0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
374 |
.ti -1.5 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
375 |
\(bu Colormap compaction has no effect for screens which |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
376 |
have the StaticColor colormap as the default (i.e. for |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
377 |
screens which have a device modifier of \fIstaticvis\fP). |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
378 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
379 |
.ti -1.5 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
380 |
\(bu You should discard the saved workspace colors and |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
381 |
reconfigure whenever you change the device modifiers |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
382 |
(\fLstaticvis\fP, \fLgrayvis\fP or \fLdefdepth\fP) used on |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
383 |
the server command line. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
384 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
385 |
.ti -1.5 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
386 |
\(bu You should discard the saved colors and reconfigure whenever |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
387 |
you remove a screen from your configuration. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
388 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
389 |
.ti -1.5 |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
390 |
\(bu Colormap compaction does not preclude other means of |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
391 |
inter-application color sharing which programmers may |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
392 |
want to use. For example, X11 \fIStandard Colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
393 |
properties\fP can be used to promote sharing among imaging |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
394 |
applications that use lots of colors. Application developers can |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
395 |
use these properties in conjunction with colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
396 |
compaction to achieve even less colormap flashing. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
397 |
.in -0.5i |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
398 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
399 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
400 |
\fBG. Summary\fP |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
401 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
402 |
Compacting the default colormap is the process of selecting certain application |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
403 |
colors you would prefer not to flash and saving these |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
404 |
colors into a file. When the window system is reentered, these colors |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
405 |
will end up at the high end of the default colormap, a preferred position |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
406 |
which often decreases colormap flashing. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
407 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
408 |
This process may not always make sense for your situation. Depending on the |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
409 |
applications you run, it may or may not help, but it probably will. You |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
410 |
must also make sure you keep the configuration up-to-date to continue |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
411 |
to derive the maximum benefits. If, after trying colormap compaction, colormap |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
412 |
flashing on your desktop is not reduced, colormap compaction should be turned back off. |
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
413 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
414 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
415 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
416 |
|
3b62053c3b77
6730028 Moving /usr/openwin/lib/mkcookie to /usr/X11/lib
Sam Lau <Sam.Lau@Sun.COM>
parents:
diff
changeset
|
417 |