XFixesCreateRegionFromXXX region redux
Keith Packard <[email protected]>
| Newsgroups | gmane.comp.freedesktop.xserver |
|---|---|
| Message-ID | <[email protected]> |
It's nice to play with a system for a while and discover the nits before shipping things for real. I've been trying to eliminate (or at least limit) the errors generated by the compositing manager and have discovered one case that's causing cascading errors. I'm using XFixesCreateRegionFromWindow to construct the area of the window to copy into the destination. That's working fine when the windows aren't disappearing, but when they do, the request fails and the region ID just allocated ends up not referencing a valid region. Further uses of this region cause a cascade of errors. Yuck. A simple solution that I've come up with is to replace the CreateRegionFromXXX apis with CopyRegionFromXXX instead; the internal cost is identical. Applications would then create an empty region object and copy the contents from the window; non-existant windows would result in empty regions and a single error, rather than an invalid region XID. I can (obviously) simply add CopyRegionFromXXX requests to XFixes, but I'd rather remove the CreateRegionFromXXX requests at the same time. Comments? -keith