XGetImage returns junk with Xorg/dummy_drv/VTs
Michael.McDonald at gdc4s.com
Mon Nov 24 12:53:53 PST 2008
> -----Original Message-----
> From: Peter Harris [mailto:peter.harris at hummingbird.com]
> Sent: Monday, November 24, 2008 12:54 PM
> To: McDonald, Michael-p7438c
> Cc: xorg at lists.freedesktop.org
> Subject: Re: XGetImage returns junk with Xorg/dummy_drv/VTs
> > 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.
> Is your application prepared to handle BadMatch if randr has
> rotated or
> resized the root window since the last time you queried it?
Those ops aren't allowed in my specfic case. But yes, I'm aware that
the root window may be resized, not that it has anything to do with
XGetImage returning junk.
> Ah. If that is case, xorg may be returning the wrong bits, and might
> need to be fixed.
But it's the same Xorg in all cases. What differs is what other
drivers may or may not be running on the system at the same time.
> > But heck, Xorg isn't even consistant in returning junk! If I start
> > Xorg+dummy on a machine running Xorg+nvidia, I get good
> results. If I
> > run Xorg+dummy on a machine running Xorg+intel, I get junk. If I run
> > Xorg+dummy on a machine with no other X server, I get junk. What is
> > Xorg+nvidia doing "wrong"?
> nvidia is doing nothing "wrong". In the case of an obscured
> window, the
> returned bits are undefined. "Undefined" means exactly that
> there is no
> such thing as a "wrong" set of bits to return. It helps to think of it
> as a stream from /dev/urandom, which might (through coincidence) match
> what you were expecting.
> In your case, I misunderstood what was going on. If the
> windows are not
> obscured, then my reasoning is faulty.
In the X protocol, there is no concept of the root window being
obscured. That's VT brain damage, IMNSHO.
More information about the xorg