136 The X-Windows Disaster And then you’ll realize what you did wrong, of course, you’ll realize what you should have done ALL ALONG: all:: $(RM) -rf $(TOP) But BE CAREFUL! That second line can’t begin with a space. On the whole, X extensions are a failure. The notable exception that proves the rule is the Shaped Window extension, which was specifically designed to implement round clocks and eyeballs. But most application writers just don’t bother using proprietary extensions like Display PostScript, because X terminals and MIT servers don’t support them. Many find it too much of a hassle to use more ubiquitous extensions like shared memory, double buffering, or splines: they still don’t work in many cases, so you have to be prepared to do without them. If you really don’t need the extension, then why complicate your code with special cases? And most applications that do use extensions just assume they’re supported and bomb if they’re not. The most that can be said about the lowest-common-denominator approach that X takes to graphics is that it levels the playing field, allowing incredi- bly stupid companies to jump on the bandwagon and sell obsolete junk that’s just as unusable as high-end, brand-name workstations: Date: Wed, 10 Apr 91 08:14:16 EDT From: Steve Strassmann straz@media-lab.mit.edu To: UNIX-HATERS Subject: the display from hell My HP 9000/835 console has two 19” color monitors, and some extremely expensive Turbo SRX graphics hardware to drive them. You'd think that I could simply tell X windows that it has two dis- plays, the left one and the right one, but that would be unthinkably simple. After all, if toys like the Macintosh can do this, Unix has to make it much more difficult to prove how advanced it is. So, what I really have is two display devices, /dev/crt0 and /dev/crt1. No, sorry, I lied about that. You see, the Turbo SRX display has a graphics plane (with 24 bits per pixel) and an overlay plane (with 4 bits per pixel). The overlay plane is for things like, well, window systems, which need things like
X Myths 137 cursors, and the graphics plane is to draw 3D graphics. So I really need four devices: /dev/crt0 the graphics plane of the right monitor /dev/crt1 the graphics plane of the left monitor /dev/ocrt0 the overlay plane of the right monitor /dev/ocrt1 the overlay plane of the left monitor No, sorry, I lied about that. /dev/ocrt0 only gives you three out of the four overlay bits. The fourth bit is reserved exclusively for the private use of federal emer- gency relief teams in case of a national outbreak of Pixel Rot. If you want to live dangerously and under threat of FBI investigation, you can use /dev/o4crt0 and /dev/o4crt1 in order to really draw on the overlay planes. So, all you have to do is tell X Windows to use these o4 overlays, and you can draw graphics on the graphics plane. No, sorry, I lied about that. X will not run in these 4-bit overlay planes. This is because I’m using Motif, which is so sophisticated it forces you to put a 1” thick border around each window in case your mouse is so worthless you can’t hit anything you aim at, so you need widgets designed from the same style manual as the runway at Moscow International Airport. My program has a browser that actually uses different colors to distin- guish different kinds of nodes. Unlike an IBM PC Jr., however, this workstation with $150,000 worth of 28 bits-per-pixel supercharged display hardware cannot display more than 16 colors at a time. If you’re using the Motif self-abuse kit, asking for the 17th color causes your program to crash horribly. So, thinks I to myself cleverly, I shall run X Windows on the graph- ics plane. This means X will not use the overlay planes, which have special hardware for cursors. This also means I cannot use the super cool 3D graphics hardware either, because in order to draw a cube, I would have to “steal” the frame buffer from X, which is surly and uncooperative about that sort of thing. What it does give me, however, is a unique pleasure. The overlay plane is used for /dev/console, which means all console messages get printed in 10 Point Troglodyte Bold, superimposed in white over whatever else is on my screen, like for example, a demo that I may be happen to be giving at the time. Every time anyone in the lab prints
Previous Page Next Page