Blob Blame History Raw
From 35f3ea239227157e97a63b2738be48bcc130c6c8 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 3 Oct 2018 09:00:40 -0400
Subject: [PATCH] kms: call LeaveVT on shutdown

It's important that LeaveVT is called on shutdown, since
the X server will leave the current vt on shutdown.

This commit adds the required call, and fixes some confusion
when one X server is starting at around the same time another
X server is shutting down.

(cherry picked from commit 0f9e801c04f31b0b173ec22725d08122ecbfaea6)
---
 src/qxl_kms.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qxl_kms.c b/src/qxl_kms.c
index d11b20e..d098ebf 100644
--- a/src/qxl_kms.c
+++ b/src/qxl_kms.c
@@ -132,6 +132,9 @@ qxl_close_screen_kms (CLOSE_SCREEN_ARGS_DECL)
 
     result = pScreen->CloseScreen (CLOSE_SCREEN_ARGS);
 
+    if (pScrn->vtSema)
+	pScrn->LeaveVT (VT_FUNC_ARGS);
+
     return result;
 }
 
-- 
2.20.1