3 ms·
I believe that statement (the first half, anyway) is simply not true. X11 is capable of displaying different windows at different color depths. Look at the "i
by ken 18y ago
I believe that statement (the first half, anyway) is simply not true. X11 is capable of displaying different windows at different color depths. Look at the "int depth" parameter to XCreateWindow, or run xwininfo(1) and check out the "Depth:" line.
Today I suspect it's not used much, if at all. When you've got a 256MB video card, what's a few extra bytes? Modern graphics cards might not even support this.
But I believe that 15 or 20 years ago, this feature actually did get used. You'd have a depth=24 root window, and a depth=4 (say) hardware overlay for things like the mouse cursor and popup menus, because they didn't really need a lot of colors, and you don't want to redraw your expensive graphics every time you moved the mouse.
Of course, everybody thought that dealing with hardware overlays and custom colormaps everywhere was a royal pain for application developers (and it was), so we came up with higher-level toolkits like GTK+ which make it really easy to splat up a window without caring about this, and it'll just use depth=24 (or whatever you've got) everywhere, and we've got tons of video memory so nobody cares anyway.
I'm not saying X11 was particularly good at this, but it did support this particular feature.