XDamage extension over-reports window damage
Jonathan Lennox
lennox at cs.columbia.edu
Thu Jan 27 15:46:53 PST 2005
On Thursday, January 27 2005, "Joel Dice" wrote to "Jonathan Lennox, xorg at lists.freedesktop.org" saying:
> I'm usually just a lurker on this list, but this is a topic that I have
> some experience with, since I have designed and implemented the
> application-sharing component of my organization's conferencing product.
Great!
> On Thu, 27 Jan 2005, Jonathan Lennox wrote:
> > (On a related note, I'd love to be able as a client to retrieve and track
> > changes to the window visible region, so I know for what parts of the window
> > XGetImage is meaningful. I can semi-track things with XVisibilityEvent and
> > XExposureEvent, but that doesn't suffice for the visibility region
> > shrinking. The former part seems like a natural fit for Xfixes?)
>
> What I do to address this is track the position of every window on the
> screen at all times and compute the visible regions myself. It would be
> nice if the server could do this for us, but it's not necessary.
Yes, it occured to me that I could do that; I suppose it's not that hard.
(Even if a server extension were defined to do it, I'd probably have to do
it anyway; requiring that servers have xdamage installed is going to be hard
enough.)
> What I haven't figured out is how to reliably determine which application
> a arbitrary window belongs to. This is easy enough on MS Windows - you
> can translate a any window ID into a process ID and from there determine
> the executable path and canonical application name. The best I've been
> able to do under X11 is group windows together based on XmuClientWindow()
> and the WM_CLIENT_LEADER atom, but this doesn't always work - menus often
> have no obvious relationship to their parent frames.
You can use XRecordIdBaseMask to determine whether two window IDs were
generated by the same client -- this works for transient windows like menus.
The window_group field of the WM_HINTS atom, and the WM_TRANSIENT_FOR atom,
are also helpful.
Unfortunately, this doesn't cover everything. Notably, GIMP plug-ins (like
the print dialog) and the main GIMP window don't seem to have any associated
server state at all, as far as I can tell. Arguably this is a bug in the
GIMP. (Though I think you'd have the same problem on Windows, since they're
actually separate processes.)
> > To motivate all of this, I'm trying to implement an X-based server for the
> > protocol defined in the Internet-Draft
> > <http://www.ietf.org/internet-drafts/draft-lennox-avt-app-sharing-00.txt>.
> > It's like VNC, but optionally window-based, so you can share individual
> > applications -- e.g., just a slideshow, as part of a multimedia conference
> > -- instead of your whole desktop.
>
> I look forward to reading this. It's about time we had a standard
> protocol for this kind of thing.
Please take a look and let me know any comments you have, especially since
you have implementation experience. (This discussion probably isn't
appropriate for the xorg list, though.)
--
Jonathan Lennox
lennox at cs.columbia.edu
More information about the xorg
mailing list