xserver-multidpi/hw
George Staplin bede83eb19 XQuartz: Fix a memory leak with surfaces that a new test found.
xp_destroy_surface was called with a surface id of 0, due to some
premature cleanup that set it to 0.  This means the surfaces
weren't being destroyed until the window was.

The code that did that was: pDRIDrawablePriv->sid = 0;

In long running applications this leak may or may not have been
harmful.  With the old libGL the surfaces weren't destroyed until
the context was destroyed or a new context created.  In the new
libGL they are reference counted, and released much sooner, so we
ran into a resource leak more noticeably with some tests.

Make the Apple DRI code dispatch events to the client(s) for
destroyed surfaces, when a resource is destroyed.  This seems to
work in my tests, however this clearly wasn't working for a while,
so bugs may result in the future if it enables some new (unexpected)
side effects.

Also add a few helpful comments to aid in understanding the code
in the future.

Tested with the test suite, Pymol, and various Mesa demos.
2009-03-04 01:39:58 -07:00
..
dmx Death to APPGROUP. 2009-02-24 18:40:42 -08:00
kdrive Revert "kdrive: don't post motion event if there was no motion. #16179" 2008-07-29 13:17:27 +09:30
vfb Darwin: Use __APPLE__ instead of __DARWIN__ 2007-12-07 18:53:31 -08:00
xfree86 Build fixes 2009-02-24 22:28:36 -08:00
xgl Death to RCS tags. 2007-06-29 14:06:52 -04:00
xnest X n'est pas une print API. 2009-02-24 17:46:36 -08:00
xquartz XQuartz: Fix a memory leak with surfaces that a new test found. 2009-03-04 01:39:58 -07:00
xwin Death to RCS tags. 2007-06-29 14:06:52 -04:00
Makefile.am X n'est pas une print API. 2009-02-24 17:46:36 -08:00