summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11/xm_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/x11/xm_api.c')
-rw-r--r--src/mesa/drivers/x11/xm_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index cb71b344a2..aad902d1ed 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -2064,12 +2064,12 @@ void xmesa_destroy_buffers_on_display(XMesaDisplay *dpy)
* Look for XMesaBuffers whose X window has been destroyed.
* Deallocate any such XMesaBuffers.
*/
-void XMesaGarbageCollect( void )
+void XMesaGarbageCollect( XMesaDisplay* dpy )
{
XMesaBuffer b, next;
for (b=XMesaBufferList; b; b=next) {
next = b->Next;
- if (b->display && b->frontxrb->drawable && b->type == WINDOW) {
+ if (b->display && b->display == dpy && b->frontxrb->drawable && b->type == WINDOW) {
XSync(b->display, False);
if (!window_exists( b->display, b->frontxrb->drawable )) {
/* found a dead window, free the ancillary info */