summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-06-10 10:53:29 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-06-10 10:53:29 +0100
commitc9b89fc87f1d43a715cd9c5915bfed957175986d (patch)
tree32d0b206527415d8eb5f75ae39f2c11873d1c99b
parentea560e25dfcce3750339b477a1a3c05f504cf91e (diff)
sna: Drain the event queues before CloseScreen
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_driver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 60bd53ab..42d4091b 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -737,6 +737,10 @@ static Bool sna_close_screen(int scrnIndex, ScreenPtr screen)
sna_uevent_fini(scrn);
#endif
+ /* drain the event queues */
+ sna_accel_wakeup_handler(sna);
+ sna_dri_wakeup(sna);
+
if (scrn->vtSema == TRUE)
sna_leave_vt(scrnIndex, 0);