papa@pollux.usc.edu (Marco Papa) (08/26/88)
I am trying to generate a cursor (of the X-10 type) that will behave the same
on monochrome screens. I use XCreateBitmapFromData and XCreatePixmapCursor.
I want it to have WHITE foreground. The problem is as follows: no matter what
is the value that I select for the foreground or background I get a WHITE
cursor on an IBM AED (experimental display) and a BLACK cursor on an IBM
apa16 display. Since I use a "black" window, the cursor is totally invisible
with the apa16.
I noticed that the "X-cross" cursor is white with black border on the AED and
black with white border on the apa16 and other color displays. How can I
get my cursor to come up WHITE instead of BLACK? Any help is appreciated.
The code follows.
DefineCursor()
{
int x, y;
Pixmap bm;
Pixmap bm2;
XColor color;
unsigned short curs[16];
/* ...... */
/* set color: I want WHITE */
color.pixel = WhitePixel(display, DefaultScreen(display));
XQueryColor(display,
DefaultColormap(display, DefaultScreen(display)),
&color);
bm = XCreateBitmapFromData(display, DefaultRootWindow(display),
curs, 16, 16);
bm2 = XCreateBitmapFromData(display, DefaultRootWindow(display),
curs, 16, 16);
cur = XCreatePixmapCursor(display, bm, bm2,
&color, &color,
x,
y ));
XFreePixmap(display, bm2);
XFreePixmap(display, bm);
}
-- Marco Papa
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa BIX:papa ARPAnet:pollux!papa@oberon.usc.edu
"There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
rpd@CS.CMU.EDU (Richard Draves) (08/27/88)
Some cursors on AEDs have black & white reversed because aedRealizeCursor is brain-damaged. See my bug-report & fix, XBUG #900. I recently reported several AED bugs (w/fixes) to xbugs; if you are regularly using an AED you might want to get them. I can send them to you if you can't otherwise get them. Rich