McDonald, Michael-p7438c wrote: > >>> I'm only doing XGetImage on the root window. >> Is your application prepared to handle undefined bits for windows that >> are not the same depth as the root? (Overlays, for example, but also >> non-sample servers make multiple depths available). > > As far as I'm aware, root windows only have one depth. I believe that > holds for every individual window as well: a window has a single depth, > which may differ from its parent's and its sibling's depths.
Exactly. And XGetImage always includes inferior windows[1]. When those inferiors are a different depth, those contents of XGetImage are undefined[2]. Think about what happens when the root is depth 8, and your application intelligently picks a depth 24 visual for its display. Your monitor will display the full 24-bit image just fine, but a lossless translation for XGetImage simply isn't possible. The protocol definition doesn't even suggest an approximation. > In the X protocol, there is no concept of the root window being > obscured. I don't see why not. If I am running multiple desktops, the root of one desktop may be obscured if I am viewing a different desktop. Consider Xnest (and Xephyr), which can have its root window obscured by other windows on the host server. Consider also a virtual root that is larger than the resolution of your monitor. Traditionally, the sample implementation has saved the bits that are not visible, but there is no reason it needs to (other than performance). Peter Harris [1] Yes, that was a stupid protocol design decision. But at least the protocol designers admit it in the docs: "This request is not general-purpose... It is intended specifically for rudimentary hardcopy support." [2] http://cgit.freedesktop.org/xorg/doc/xorg-docs/plain/hardcopy/XProtocol/proto.PS.gz -- Hummingbird Connectivity - A Division of Open Text Peter Harris http://connectivity.hummingbird.com Research and Development Phone: +1 905 762 6001 [EMAIL PROTECTED] Toll Free: 1 877 359 4866 _______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
