summaryrefslogtreecommitdiff
path: root/src/sna/sna_dri2.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-01-06 10:00:19 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-01-06 10:01:23 +0000
commit5c735befdcc40f94bd740be9fc0df54ad53aa174 (patch)
treed623b013dee7edb39f5d943efb22a82fcca13c92 /src/sna/sna_dri2.c
parent8e987511f0f190115e2587a94922b766d4f8719a (diff)
sna/dri2: Ignore pending SwapComplete events when the window is destroyed
Since we need the drawable to call DRI2SwapComplete/DRI2WakeClient, if the window is destroyed that becomes inoperable (as we are called late in the chain). Let's hope the client isn't blocked. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri2.c')
-rw-r--r--src/sna/sna_dri2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 33cf3d9e..63c49327 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1837,20 +1837,20 @@ void sna_dri2_destroy_window(WindowPtr win)
chain = priv->chain;
while ((info = chain)) {
+ DBG(("%s: freeing event, pending signal? %d, pending swap? handle=%d\n",
+ __FUNCTION__, info->signal,
+ info->pending.bo ? info->pending.bo->handle : 0));
assert(info->draw == &win->drawable);
- if (info->signal)
- frame_swap_complete(info, DRI2_EXCHANGE_COMPLETE);
+
if (info->pending.bo) {
assert(info->pending.bo->active_scanout > 0);
info->pending.bo->active_scanout--;
- info->signal = true;
- frame_swap_complete(info, DRI2_EXCHANGE_COMPLETE);
-
kgem_bo_destroy(&sna->kgem, info->pending.bo);
info->pending.bo = NULL;
}
+ info->signal = false;
info->draw = NULL;
list_del(&info->link);